Skip to content

Commit

Permalink
[app] Check local.properties file presence in release signing config
Browse files Browse the repository at this point in the history
  • Loading branch information
3cky committed Sep 28, 2021
1 parent 0126ebe commit cce1378
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ android {
// Release management
signingConfigs {
release {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
keyAlias properties.getProperty('key.alias')
keyPassword properties.getProperty('key.password')
storeFile file(properties.getOrDefault('key.store.file', 'release.keystore'))
storePassword properties.getProperty('key.store.password')
File propsFile = project.rootProject.file('local.properties')
if (propsFile.exists()) {
Properties properties = new Properties()
properties.load(propsFile.newDataInputStream())
keyAlias properties.getProperty('key.alias')
keyPassword properties.getProperty('key.password')
storeFile file(properties.getOrDefault('key.store.file', 'release.keystore'))
storePassword properties.getProperty('key.store.password')
}
}
}
buildTypes {
Expand Down

0 comments on commit cce1378

Please sign in to comment.