Skip to content

Commit ed04267

Browse files
committed
Changes for building signed APKs
1 parent 012745e commit ed04267

File tree

3 files changed

+77
-3
lines changed

3 files changed

+77
-3
lines changed

chan.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
package.prefix=com.mishiranu.dashchan.chan
2-
update.uri=//raw.githubusercontent.com/Mishiranu/Dashchan/master/update/data.json
2+
update.uri=//raw.githubusercontent.com/TrixiEther/DashchanFork/experimental/update/data.json

extensions/endchan/build.gradle

+38-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,44 @@
11
apply plugin: 'chan-extension'
22

33
chan {
4-
versionName '1.7'
4+
versionName '1.7-experimental-1.0'
55
apiVersion 1
66
hosts 'endchan.net', 'endchan.gg', 'endchan.org', 'endchan.xyz'
77
}
8+
9+
android {
10+
signingConfigs {
11+
release {
12+
13+
def keystoreProperties = new Properties()
14+
try {
15+
file('keystore.properties').newInputStream().withCloseable { keystoreProperties.load(it) }
16+
} catch (IOException ignored) {
17+
keystoreProperties = null
18+
}
19+
20+
if (keystoreProperties == null) {
21+
//git workflow build
22+
System.out.println("keystoreProperties is null")
23+
def key_file = System.getenv("KEYSTORE_FILENAME")
24+
storeFile file(key_file != null ? key_file : "keystore/dashchan")
25+
storePassword System.getenv("KEYSTORE_PASSWORD")
26+
keyAlias System.getenv("RELEASE_SIGN_KEY_ALIAS")
27+
keyPassword System.getenv("RELEASE_SIGN_KEY_PASSWORD")
28+
29+
} else {
30+
//local build
31+
storeFile keystoreProperties['store.file']
32+
storePassword keystoreProperties['store.password']
33+
keyAlias keystoreProperties['key.alias']
34+
keyPassword keystoreProperties['key.password']
35+
}
36+
37+
}
38+
}
39+
buildTypes {
40+
release {
41+
signingConfig signingConfigs.release
42+
}
43+
}
44+
}

extensions/fourchan/build.gradle

+38-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'chan-extension'
22

33
chan {
4-
versionName '1.27'
4+
versionName '1.27-experimental-1.0'
55
apiVersion 1
66
hosts '4chan.org', 'www.4chan.org', 'boards.4chan.org', 'sys.4chan.org',
77
'4channel.org', 'www.4channel.org', 'boards.4channel.org', 'sys.4channel.org',
@@ -11,3 +11,40 @@ chan {
1111
dependencies {
1212
implementation 'chan.library:template-parser:0'
1313
}
14+
15+
android {
16+
signingConfigs {
17+
release {
18+
19+
def keystoreProperties = new Properties()
20+
try {
21+
file('keystore.properties').newInputStream().withCloseable { keystoreProperties.load(it) }
22+
} catch (IOException ignored) {
23+
keystoreProperties = null
24+
}
25+
26+
if (keystoreProperties == null) {
27+
//git workflow build
28+
System.out.println("keystoreProperties is null")
29+
def key_file = System.getenv("KEYSTORE_FILENAME")
30+
storeFile file(key_file != null ? key_file : "keystore/dashchan")
31+
storePassword System.getenv("KEYSTORE_PASSWORD")
32+
keyAlias System.getenv("RELEASE_SIGN_KEY_ALIAS")
33+
keyPassword System.getenv("RELEASE_SIGN_KEY_PASSWORD")
34+
35+
} else {
36+
//local build
37+
storeFile keystoreProperties['store.file']
38+
storePassword keystoreProperties['store.password']
39+
keyAlias keystoreProperties['key.alias']
40+
keyPassword keystoreProperties['key.password']
41+
}
42+
43+
}
44+
}
45+
buildTypes {
46+
release {
47+
signingConfig signingConfigs.release
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)