fix: use project keystore for consistent APK signing (fixes OTA update signature conflict)

This commit is contained in:
dadaloop82
2026-05-06 14:25:59 +00:00
parent 484b378be9
commit cbb3f6b288
3 changed files with 8 additions and 12 deletions
+8 -12
View File
@@ -16,26 +16,22 @@ android {
}
signingConfigs {
// Use the standard Android debug keystore when building locally so the
// debug APK signature stays consistent across machines (needed for OTA updates).
// In CI the keystore doesn't exist — fall back to Gradle's auto-generated key.
getByName("debug") {
val ks = file("${System.getProperty("user.home")}/.android/debug.keystore")
if (ks.exists()) {
storeFile = ks
storePassword = "android"
keyAlias = "androiddebugkey"
keyPassword = "android"
}
// Project keystore — same on every machine so OTA updates always work.
create("project") {
storeFile = file("../evershelf.jks")
storePassword = "evershelf123"
keyAlias = "evershelf"
keyPassword = "evershelf123"
}
}
buildTypes {
debug {
signingConfig = signingConfigs.getByName("debug")
signingConfig = signingConfigs.getByName("project")
}
release {
isMinifyEnabled = false
signingConfig = signingConfigs.getByName("project")
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
}
}