restructure signing config

This commit is contained in:
Daniel Gultsch 2017-12-09 16:14:43 +01:00
parent 5f5f4ca190
commit b0d83ae4b9
2 changed files with 11 additions and 10 deletions

1
.gitignore vendored
View File

@ -9,6 +9,7 @@ src/playstore/res/values/gcm.xml
build/
captures/
gradle.properties
signing.properties
# Ignore Gradle GUI config
gradle-app.setting

View File

@ -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 {