File tree Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,12 @@ jobs:
18
18
distribution : ' temurin'
19
19
- name : Load keystore
20
20
run : |
21
- mkdir gradle-config && \
22
- echo "${{ secrets.KEYSTORE_FILE_CONTENTS }}" | base64 -d > gradle-config/keystore && \
23
- cat <<EOL > gradle-config/gradle.properties
24
- RELEASE_STORE_FILE=$PWD/gradle-config/keystore
25
- RELEASE_STORE_PASSWORD=${{ secrets.RELEASE_STORE_PASSWORD }}
26
- RELEASE_KEY_ALIAS=${{ secrets.RELEASE_KEY_ALIAS }}
27
- RELEASE_KEY_PASSWORD=${{ secrets.RELEASE_KEY_PASSWORD }}
21
+ echo "${{ secrets.KEYSTORE_FILE_CONTENTS }}" | base64 -d > keystore.jks && \
22
+ cat <<EOL > local.properties
23
+ storeFilePath=keystore.jks
24
+ storePassword=${{ secrets.RELEASE_STORE_PASSWORD }}
25
+ keyAlias=${{ secrets.RELEASE_KEY_ALIAS }}
26
+ keyPassword=${{ secrets.RELEASE_KEY_PASSWORD }}
28
27
EOL
29
28
- name : Build Release APK
30
29
run : ./gradlew assembleRelease
Original file line number Diff line number Diff line change 13
13
.externalNativeBuild
14
14
.cxx
15
15
local.properties
16
+ keystore.jks
Original file line number Diff line number Diff line change
1
+ import org.jetbrains.kotlin.konan.properties.Properties
2
+
1
3
plugins {
2
4
id(" com.android.application" )
3
5
id(" org.jetbrains.kotlin.android" )
@@ -21,11 +23,14 @@ android {
21
23
}
22
24
23
25
signingConfigs {
24
- release {
25
- storeFile file(RELEASE_STORE_FILE )
26
- storePassword RELEASE_STORE_PASSWORD
27
- keyAlias RELEASE_KEY_ALIAS
28
- keyPassword RELEASE_KEY_PASSWORD
26
+ create(" release" ) {
27
+ val properties = Properties ().apply {
28
+ load(File (" local.properties" ).reader())
29
+ }
30
+ storeFile = File (properties.getProperty(" storeFilePath" ))
31
+ storePassword = properties.getProperty(" storePassword" )
32
+ keyPassword = properties.getProperty(" keyPassword" )
33
+ keyAlias = properties.getProperty(" keyAlias" )
29
34
}
30
35
}
31
36
@@ -36,7 +41,7 @@ android {
36
41
getDefaultProguardFile(" proguard-android-optimize.txt" ),
37
42
" proguard-rules.pro"
38
43
)
39
- signingConfig signingConfigs.release
44
+ signingConfig = signingConfigs.getByName( " release" )
40
45
}
41
46
}
42
47
compileOptions {
You can’t perform that action at this time.
0 commit comments