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:
+12
-7
@@ -31,11 +31,14 @@ android {
|
|||||||
keyPassword = System.getenv("KEY_PASSWORD")
|
keyPassword = System.getenv("KEY_PASSWORD")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
create("debugConfig") {
|
val localDebugKeystore = file("${rootDir}/debug.keystore")
|
||||||
storeFile = file("${rootDir}/debug.keystore")
|
if (localDebugKeystore.exists()) {
|
||||||
storePassword = "android"
|
create("debugConfig") {
|
||||||
keyAlias = "androiddebugkey"
|
storeFile = localDebugKeystore
|
||||||
keyPassword = "android"
|
storePassword = "android"
|
||||||
|
keyAlias = "androiddebugkey"
|
||||||
|
keyPassword = "android"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,10 +48,12 @@ android {
|
|||||||
isMinifyEnabled = false
|
isMinifyEnabled = false
|
||||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
val releaseSigning = signingConfigs.findByName("release")
|
val releaseSigning = signingConfigs.findByName("release")
|
||||||
signingConfig = releaseSigning ?: signingConfigs.getByName("debugConfig")
|
val debugConfigSigning = signingConfigs.findByName("debugConfig")
|
||||||
|
signingConfig = releaseSigning ?: (debugConfigSigning ?: signingConfigs.getByName("debug"))
|
||||||
}
|
}
|
||||||
debug {
|
debug {
|
||||||
signingConfig = signingConfigs.getByName("debugConfig")
|
val debugConfigSigning = signingConfigs.findByName("debugConfig")
|
||||||
|
signingConfig = debugConfigSigning ?: signingConfigs.getByName("debug")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
|
|||||||
Reference in New Issue
Block a user