From 9dc8fe41544098e5086da57e9977134bec04458d Mon Sep 17 00:00:00 2001 From: jacques Date: Sat, 1 Jan 2022 18:46:49 +0100 Subject: [PATCH 1/2] Add to .gitignore --- .gitignore | 2 ++ app/preproduct/prerelease/output-metadata.json | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5884a02..19fff1a 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,5 @@ Thumbs.db *.class gen/ +/android-signing-keystore.jks +/secrets.properties diff --git a/app/preproduct/prerelease/output-metadata.json b/app/preproduct/prerelease/output-metadata.json index 7268eef..c0b772b 100644 --- a/app/preproduct/prerelease/output-metadata.json +++ b/app/preproduct/prerelease/output-metadata.json @@ -11,8 +11,8 @@ "type": "SINGLE", "filters": [], "attributes": [], - "versionCode": 260217704, - "versionName": "0.65.20211204-ac94daf", + "versionCode": 24065, + "versionName": "0.65.20220101-d04e132", "outputFile": "app-preproduct-prerelease.apk" } ], From cb77b38b825adcdf57cf21f0bff9f20fd7b73d27 Mon Sep 17 00:00:00 2001 From: jacques Date: Sat, 1 Jan 2022 18:47:19 +0100 Subject: [PATCH 2/2] Change signinConfig behavior --- app/build.gradle | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index ee698c5..65ba1e3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,15 +9,29 @@ ext.isSnapshot = false ext.minimumSdkVersion = defaultMinSdkVersion ext.git_version= ("git rev-parse --short HEAD".execute().text.trim()) +// Try reading secrets from file +def secretsPropertiesFile = rootProject.file("secrets.properties") +def secretProperties = new Properties() + +if (secretsPropertiesFile.exists()) { + secretProperties.load(new FileInputStream(secretsPropertiesFile)) +} +// Otherwise read from environment variables, this happens in CI +else { + secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}") + secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}") + secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}") +} + android { signingConfigs { release { } prerelease { - storeFile file('/home/jacques/.config/keystore') - storePassword 'nifgk/Cr' - keyAlias 'prerelase' - keyPassword 'nifgk/Cr' + storeFile file("../android-signing-keystore.jks") + storePassword secretProperties['signing_keystore_password'] + keyAlias secretProperties['signing_key_alias'] + keyPassword secretProperties['signing_key_password'] } } compileSdkVersion 29