diff --git a/android/app/build.gradle b/android/app/build.gradle index c5bac30e..ab8afbf9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -107,9 +107,19 @@ android { release { storeFile file("../../schnappix-upload-key.keystore") - storePassword "#O0he7k00O0he7k00!" + def localProperties = new Properties() + def localPropertiesFile = rootProject.file("local.properties") + if (!localPropertiesFile.exists()) { + localPropertiesFile = rootProject.file("../local.properties") + } + if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } + } + storePassword localProperties.getProperty("RELEASE_STORE_PASSWORD") ?: System.getenv("RELEASE_STORE_PASSWORD") ?: "" keyAlias "schnappix-alias" - keyPassword "#O0he7k00O0he7k00!" + keyPassword localProperties.getProperty("RELEASE_KEY_PASSWORD") ?: System.getenv("RELEASE_KEY_PASSWORD") ?: "" } } diff --git a/withAndroidSigning.js b/withAndroidSigning.js index 2d37c3db..4cf1aaa5 100644 --- a/withAndroidSigning.js +++ b/withAndroidSigning.js @@ -8,9 +8,19 @@ module.exports = function withAndroidSigning(config) { const signingConfig = ` release { storeFile file("../../schnappix-upload-key.keystore") - storePassword "#O0he7k00O0he7k00!" + def localProperties = new Properties() + def localPropertiesFile = rootProject.file("local.properties") + if (!localPropertiesFile.exists()) { + localPropertiesFile = rootProject.file("../local.properties") + } + if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } + } + storePassword localProperties.getProperty("RELEASE_STORE_PASSWORD") ?: System.getenv("RELEASE_STORE_PASSWORD") ?: "" keyAlias "schnappix-alias" - keyPassword "#O0he7k00O0he7k00!" + keyPassword localProperties.getProperty("RELEASE_KEY_PASSWORD") ?: System.getenv("RELEASE_KEY_PASSWORD") ?: "" } `;