From b0d83ae4b919fc3397d254624adeb024d2de058b Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 9 Dec 2017 16:14:43 +0100 Subject: [PATCH] restructure signing config --- .gitignore | 1 + build.gradle | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 9f1d29fe9..a3138626c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ src/playstore/res/values/gcm.xml build/ captures/ gradle.properties +signing.properties # Ignore Gradle GUI config gradle-app.setting diff --git a/build.gradle b/build.gradle index a9ca15866..1762892b7 100644 --- a/build.gradle +++ b/build.gradle @@ -86,21 +86,21 @@ android { playstore free } - if (project.hasProperty('mStoreFile') && - project.hasProperty('mStorePassword') && - project.hasProperty('mKeyAlias') && - project.hasProperty('mKeyPassword')) { + + + if(new File("signing.properties").exists()) { + Properties props = new Properties() + props.load(new FileInputStream(file("signing.properties"))) + signingConfigs { release { - storeFile file(mStoreFile) - storePassword mStorePassword - keyAlias mKeyAlias - keyPassword mKeyPassword + storeFile file(props['keystore']) + storePassword props['keystore.password'] + keyAlias props['keystore.alias'] + keyPassword props['keystore.password'] } } buildTypes.release.signingConfig = signingConfigs.release - } else { - buildTypes.release.signingConfig = null } lintOptions {