File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -29,18 +29,21 @@ android {
2929 }
3030
3131 signingConfigs {
32-
32+ // find if there is a properties file
3333 val keySecretFile = rootProject.file(" keystore.properties" )
34- if (keySecretFile.exists()) return @signingConfigs
34+ if (! keySecretFile.exists()) return @signingConfigs
3535
36+ // load the properties
3637 val properties = Properties ()
38+ keySecretFile.inputStream().use { properties.load(it) }
3739
40+ val userHome = System .getProperty(" user.home" )
3841 val storeFileName = properties.getProperty(" STORE_FILE_NAME" )
3942
40- val keyStorePath = System .getenv(" user.home" )
41- val keyStoreFolder = File (keyStorePath, " keystore" )
42- val keyStoreFile = File (keyStoreFolder, storeFileName)
43+ val keyStoreFolder = File (userHome, " keystore" )
44+ if (! keyStoreFolder.exists()) return @signingConfigs
4345
46+ val keyStoreFile = File (keyStoreFolder, storeFileName)
4447 if (! keyStoreFile.exists()) return @signingConfigs
4548
4649 create(" release" ) {
You can’t perform that action at this time.
0 commit comments