Merge pull request #169 from spk/fix-build-without-release

Allow gradle build without keystore.properties file
This commit is contained in:
Tibor Kaputa 2019-12-19 21:53:43 +01:00 committed by GitHub
commit 7bfbe1d3b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 6 deletions

View File

@ -4,7 +4,9 @@ apply plugin: 'kotlin-android-extensions'
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 28
@ -21,6 +23,7 @@ android {
}
signingConfigs {
if (keystorePropertiesFile.exists()) {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
@ -28,6 +31,7 @@ android {
storePassword keystoreProperties['storePassword']
}
}
}
buildTypes {
debug {