forked from Mishiranu/Dashchan-Extensions
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
50 lines (43 loc) · 1.54 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
apply plugin: 'chan-extension'
chan {
nameUpper 'ArchiveOfSins'
packageName 'com.trixiether.dashchan.chan.archiveofsins'
versionName '1.0'
apiVersion 1
hosts 'archiveofsins.com'
}
dependencies {
implementation project(':engines:foolfuuka')
}
android {
signingConfigs {
release {
def keystoreProperties = new Properties()
try {
file('keystore.properties').newInputStream().withCloseable { keystoreProperties.load(it) }
} catch (IOException ignored) {
keystoreProperties = null
}
if (keystoreProperties == null) {
//git workflow build
System.out.println("keystoreProperties is null")
def key_file = System.getenv("KEYSTORE_FILENAME")
storeFile file(key_file != null ? key_file : "keystore/dashchan")
storePassword System.getenv("KEYSTORE_PASSWORD")
keyAlias System.getenv("RELEASE_SIGN_KEY_ALIAS")
keyPassword System.getenv("RELEASE_SIGN_KEY_PASSWORD")
} else {
//local build
storeFile keystoreProperties['store.file']
storePassword keystoreProperties['store.password']
keyAlias keystoreProperties['key.alias']
keyPassword keystoreProperties['key.password']
}
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}