mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 05:13:58 +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
|
# ignore private keys
|
||||||
/secure.properties
|
/secure.properties
|
||||||
|
/secure.properties.test
|
||||||
|
/secure.properties.release
|
||||||
|
/test.keystore
|
||||||
/release.keystore
|
/release.keystore
|
||||||
/secure.properties
|
|
||||||
/libnotify.properties
|
/libnotify.properties
|
||||||
/google-play.json
|
/google-play.json
|
||||||
/huawei-appgallery.json
|
/huawei-appgallery.json
|
||||||
|
|||||||
@@ -222,9 +222,14 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def securityPropertiesFileExists = file('secure.properties').exists()
|
def securityPropertiesFileExists = file('secure.properties.release').exists()
|
||||||
if (securityPropertiesFileExists) {
|
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 {
|
signingConfigs {
|
||||||
@@ -233,15 +238,28 @@ android {
|
|||||||
storePassword '12345678'
|
storePassword '12345678'
|
||||||
keyAlias 'debug'
|
keyAlias 'debug'
|
||||||
keyPassword '12345678'
|
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 {
|
release {
|
||||||
if (securityPropertiesFileExists) {
|
if (securityPropertiesFileExists) {
|
||||||
println('The release signing keys are available')
|
storeFile file(secretReleaseStoreFile)
|
||||||
storeFile file(spropStoreFile)
|
storePassword secretReleaseStorePassword
|
||||||
storePassword spropStorePassword
|
keyAlias secretReleaseKeyAlias
|
||||||
keyAlias spropKeyAlias
|
keyPassword secretReleaseKeyPassword
|
||||||
keyPassword spropKeyPassword
|
println('Using signing keys from secure.properties.release')
|
||||||
} else {
|
} else {
|
||||||
println('The release signing keys are unavailable')
|
println('The release signing keys are unavailable')
|
||||||
}
|
}
|
||||||
@@ -261,7 +279,11 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
release {
|
release {
|
||||||
signingConfig signingConfigs.release
|
if (securityPropertiesFileExists) {
|
||||||
|
signingConfig signingConfigs.release
|
||||||
|
} else {
|
||||||
|
signingConfig signingConfigs.debug
|
||||||
|
}
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
// Includes the default ProGuard rules files that are packaged with the Android Gradle plugin.
|
// Includes the default ProGuard rules files that are packaged with the Android Gradle plugin.
|
||||||
@@ -276,7 +298,11 @@ android {
|
|||||||
beta {
|
beta {
|
||||||
applicationIdSuffix '.test'
|
applicationIdSuffix '.test'
|
||||||
versionNameSuffix '-test'
|
versionNameSuffix '-test'
|
||||||
signingConfig signingConfigs.release
|
if (securityTestPropertiesFilesExists) {
|
||||||
|
signingConfig signingConfigs.test
|
||||||
|
} else {
|
||||||
|
signingConfig signingConfigs.debug
|
||||||
|
}
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
// Includes the default ProGuard rules files that are packaged with the Android Gradle plugin.
|
// Includes the default ProGuard rules files that are packaged with the Android Gradle plugin.
|
||||||
|
|||||||
Reference in New Issue
Block a user