fix(build): fallback to default debug signing config when debug.keystore is missing
Gitea Release / build-and-release (push) Successful in 5m45s
Gitea Release / build-and-release (push) Successful in 5m45s
This commit is contained in:
@@ -31,13 +31,16 @@ android {
|
||||
keyPassword = System.getenv("KEY_PASSWORD")
|
||||
}
|
||||
}
|
||||
val localDebugKeystore = file("${rootDir}/debug.keystore")
|
||||
if (localDebugKeystore.exists()) {
|
||||
create("debugConfig") {
|
||||
storeFile = file("${rootDir}/debug.keystore")
|
||||
storeFile = localDebugKeystore
|
||||
storePassword = "android"
|
||||
keyAlias = "androiddebugkey"
|
||||
keyPassword = "android"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
@@ -45,10 +48,12 @@ android {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||
val releaseSigning = signingConfigs.findByName("release")
|
||||
signingConfig = releaseSigning ?: signingConfigs.getByName("debugConfig")
|
||||
val debugConfigSigning = signingConfigs.findByName("debugConfig")
|
||||
signingConfig = releaseSigning ?: (debugConfigSigning ?: signingConfigs.getByName("debug"))
|
||||
}
|
||||
debug {
|
||||
signingConfig = signingConfigs.getByName("debugConfig")
|
||||
val debugConfigSigning = signingConfigs.findByName("debugConfig")
|
||||
signingConfig = debugConfigSigning ?: signingConfigs.getByName("debug")
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
|
||||
Reference in New Issue
Block a user