From cf8a4fcdb95b75a9b1cb751ca624634981ad80af Mon Sep 17 00:00:00 2001 From: razinj Date: Mon, 24 Jun 2024 00:17:47 +0200 Subject: [PATCH] feat: use local.properties file for signing configs --- android/app/build.gradle | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 9851d3e..635791d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -89,12 +89,15 @@ android { signingConfigs { release { - if (project.hasProperty('CONTEXT_LAUNCHER_UPLOAD_STORE_FILE')) { + def keystoreProperties = new Properties() + file("local.properties").withInputStream { keystoreProperties.load(it) } + + if (keystoreProperties.containsKey('CONTEXT_LAUNCHER_UPLOAD_STORE_FILE')) { project.logger.lifecycle('[!] Release upload keystore file found.') - storeFile file(CONTEXT_LAUNCHER_UPLOAD_STORE_FILE) - storePassword CONTEXT_LAUNCHER_UPLOAD_STORE_PASSWORD - keyAlias CONTEXT_LAUNCHER_UPLOAD_KEY_ALIAS - keyPassword CONTEXT_LAUNCHER_UPLOAD_KEY_PASSWORD + storeFile file(keystoreProperties['CONTEXT_LAUNCHER_UPLOAD_STORE_FILE']) + storePassword keystoreProperties['CONTEXT_LAUNCHER_UPLOAD_STORE_PASSWORD'] + keyAlias keystoreProperties['CONTEXT_LAUNCHER_UPLOAD_KEY_ALIAS'] + keyPassword keystoreProperties['CONTEXT_LAUNCHER_UPLOAD_KEY_PASSWORD'] } else { project.logger.lifecycle('[X] Release upload keystore file not found.') }