From 28d6d78dbd87e28884700bf60d02e554755ae254 Mon Sep 17 00:00:00 2001 From: fredboy Date: Sat, 20 Apr 2024 15:22:26 +0700 Subject: [PATCH] External keystore properties --- .gitignore | 3 ++- android/build.gradle | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c83f78b..e03f558 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/android/build.gradle b/android/build.gradle index fdd8e08..c59ba71 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -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 { -- 2.29.2