DEADSOFTWARE

External keystore properties
authorfredboy <fredboy@protonmail.com>
Sat, 20 Apr 2024 08:22:26 +0000 (15:22 +0700)
committerfredboy <fredboy@protonmail.com>
Sat, 20 Apr 2024 08:22:26 +0000 (15:22 +0700)
.gitignore
android/build.gradle

index c83f78b4ffd5af2bd48e8f05d719903386ff5a79..e03f5587f9ef9b42b0be788ce28a0aa394291c60 100644 (file)
@@ -117,4 +117,5 @@ Thumbs.db
 !/ios-moe/xcode/*.xcodeproj/project.pbxproj
 /ios-moe/xcode/native/
 
-release-*/
\ No newline at end of file
+release-*/
+keystore.properties
index fdd8e08ce776b5c89d94cfed6ef574eeeb66925e..c59ba712420e717f099462642938c176a6add054 100644 (file)
@@ -2,6 +2,10 @@ plugins {
     id "kotlin-android"
 }
 
+def keystorePropertiesFile = rootProject.file("keystore.properties")
+def keystoreProperties = new Properties()
+keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
+
 android {
     namespace "ru.deadsoftware.cavedroid"
     compileSdkVersion 34
@@ -38,12 +42,30 @@ android {
             outputFileName = "android-${versionName}.apk"
         }
     }
+
+    signingConfigs {
+        debug_config {
+            storeFile file(keystoreProperties['debugKeystorePath'])
+            storePassword keystoreProperties['debugKeystorePassword']
+            keyAlias keystoreProperties['debugKeyAlias']
+            keyPassword keystoreProperties['debugKeyPassword']
+        }
+        release_config {
+            storeFile file(keystoreProperties['releaseKeystorePath'])
+            storePassword keystoreProperties['releaseKeystorePassword']
+            keyAlias keystoreProperties['releaseKeyAlias']
+            keyPassword keystoreProperties['releaseKeyPassword']
+        }
+    }
+
     buildTypes {
         release {
             minifyEnabled false
+            signingConfig signingConfigs.release_config
         }
         debug {
             applicationIdSuffix ".debug"
+            signingConfig signingConfigs.debug_config
         }
     }
     buildFeatures {