Make APK release signature optional

This commit is contained in:
Gabriel Calero 2018-05-30 12:43:44 -03:00
parent 4b9295b9be
commit a36c41fc13

View file

@ -29,10 +29,10 @@ android {
}
signingConfigs {
release {
storeFile file(HIFI_ANDROID_KEYSTORE)
storePassword HIFI_ANDROID_KEYSTORE_PASSWORD
keyAlias HIFI_ANDROID_KEY_ALIAS
keyPassword HIFI_ANDROID_KEY_PASSWORD
storeFile project.hasProperty("HIFI_ANDROID_KEYSTORE") ? file(HIFI_ANDROID_KEYSTORE) : null
storePassword project.hasProperty("HIFI_ANDROID_KEYSTORE_PASSWORD") ? HIFI_ANDROID_KEYSTORE_PASSWORD : ''
keyAlias project.hasProperty("HIFI_ANDROID_KEY_ALIAS") ? HIFI_ANDROID_KEY_ALIAS : ''
keyPassword project.hasProperty("HIFI_ANDROID_KEY_PASSWORD") ? HIFI_ANDROID_KEY_PASSWORD : ''
}
}
}
@ -46,7 +46,10 @@ android {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
signingConfig project.hasProperty("HIFI_ANDROID_KEYSTORE") &&
project.hasProperty("HIFI_ANDROID_KEYSTORE_PASSWORD") &&
project.hasProperty("HIFI_ANDROID_KEY_ALIAS") &&
project.hasProperty("HIFI_ANDROID_KEY_PASSWORD")? signingConfigs.release : null
}
}