mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[android] Use debug signing config on beta build
Signed-off-by: jeanbaptisteC <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
committed by
Konstantin Pastbin
parent
ea881db7ea
commit
0fcfee86fb
4
android/app/.gitignore
vendored
4
android/app/.gitignore
vendored
@@ -3,8 +3,10 @@
|
||||
|
||||
# ignore private keys
|
||||
/secure.properties
|
||||
/secure.properties.test
|
||||
/secure.properties.release
|
||||
/test.keystore
|
||||
/release.keystore
|
||||
/secure.properties
|
||||
/libnotify.properties
|
||||
/google-play.json
|
||||
/huawei-appgallery.json
|
||||
|
||||
@@ -222,9 +222,14 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
def securityPropertiesFileExists = file('secure.properties').exists()
|
||||
def securityPropertiesFileExists = file('secure.properties.release').exists()
|
||||
if (securityPropertiesFileExists) {
|
||||
apply from: 'secure.properties'
|
||||
apply from: 'secure.properties.release'
|
||||
}
|
||||
|
||||
def securityTestPropertiesFilesExists = file('secure.properties.test').exists()
|
||||
if(securityTestPropertiesFilesExists) {
|
||||
apply from: 'secure.properties.test'
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
@@ -233,15 +238,28 @@ android {
|
||||
storePassword '12345678'
|
||||
keyAlias 'debug'
|
||||
keyPassword '12345678'
|
||||
println('Using DEBUG signing keys')
|
||||
}
|
||||
|
||||
test {
|
||||
if (securityTestPropertiesFilesExists) {
|
||||
storeFile file(secretTestStoreFile)
|
||||
storePassword secretTestStorePassword
|
||||
keyAlias secretTestKeyAlias
|
||||
keyPassword secretTestKeyPassword
|
||||
println('Using signing keys from secure.properties.test')
|
||||
} else {
|
||||
println('The test signing keys are unavailable')
|
||||
}
|
||||
}
|
||||
|
||||
release {
|
||||
if (securityPropertiesFileExists) {
|
||||
println('The release signing keys are available')
|
||||
storeFile file(spropStoreFile)
|
||||
storePassword spropStorePassword
|
||||
keyAlias spropKeyAlias
|
||||
keyPassword spropKeyPassword
|
||||
storeFile file(secretReleaseStoreFile)
|
||||
storePassword secretReleaseStorePassword
|
||||
keyAlias secretReleaseKeyAlias
|
||||
keyPassword secretReleaseKeyPassword
|
||||
println('Using signing keys from secure.properties.release')
|
||||
} else {
|
||||
println('The release signing keys are unavailable')
|
||||
}
|
||||
@@ -261,7 +279,11 @@ android {
|
||||
}
|
||||
|
||||
release {
|
||||
if (securityPropertiesFileExists) {
|
||||
signingConfig signingConfigs.release
|
||||
} else {
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
// Includes the default ProGuard rules files that are packaged with the Android Gradle plugin.
|
||||
@@ -276,7 +298,11 @@ android {
|
||||
beta {
|
||||
applicationIdSuffix '.test'
|
||||
versionNameSuffix '-test'
|
||||
signingConfig signingConfigs.release
|
||||
if (securityTestPropertiesFilesExists) {
|
||||
signingConfig signingConfigs.test
|
||||
} else {
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
// Includes the default ProGuard rules files that are packaged with the Android Gradle plugin.
|
||||
|
||||
Reference in New Issue
Block a user