File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,24 @@ android {
1919 testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
2020 }
2121
22+ val hasSigning = listOf (
23+ " RELEASE_STORE_FILE" ,
24+ " RELEASE_STORE_PASSWORD" ,
25+ " RELEASE_KEY_ALIAS" ,
26+ " RELEASE_KEY_PASSWORD"
27+ ).all { project.hasProperty(it) }
28+
29+ signingConfigs {
30+ if (hasSigning) {
31+ create(" release" ) {
32+ storeFile = file(project.property(" RELEASE_STORE_FILE" ) as String )
33+ storePassword = project.property(" RELEASE_STORE_PASSWORD" ) as String
34+ keyAlias = project.property(" RELEASE_KEY_ALIAS" ) as String
35+ keyPassword = project.property(" RELEASE_KEY_PASSWORD" ) as String
36+ }
37+ }
38+ }
39+
2240 buildTypes {
2341 release {
2442 ndk {
@@ -30,6 +48,9 @@ android {
3048 getDefaultProguardFile(" proguard-android-optimize.txt" ),
3149 " proguard-rules.pro"
3250 )
51+ if (hasSigning) {
52+ signingConfig = signingConfigs.getByName(" release" )
53+ }
3354 }
3455 }
3556 compileOptions {
You can’t perform that action at this time.
0 commit comments