diff --git a/app/build.gradle.kts b/app/build.gradle.kts index da6c621..12bbcfe 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -43,11 +43,31 @@ android { // Read from a properties file outside the repository, so the keystore and // its password are never in git and a checkout without them still builds // (unsigned, which is exactly what an unsigned build should be). + // 🔴 **This app's OWN key, not the one every Flamenet Android app shares.** + // `.flamenet-android-signing.properties` was made for Flamenet Files, and + // because the path is app-agnostic this app silently inherited it — every + // release before 2026-08-25 went out as `CN=Flamenet Files`. Nobody chose + // that for a messenger; it fell out of the layout. + // + // It matters because **an Android signing key is permanent**: once a device + // installs a build signed with one key, it REFUSES every later build signed + // with another. Sharing one key across products also means one compromised + // keystore takes out both. + // + // So: prefer this app's own file, fall back to the shared one so a machine + // that only has the old setup still produces a signed build rather than + // failing confusingly. + // + // ⚠️ Both files live outside the repo and hold a password in the clear. They + // are never in git, and a checkout without them still builds — unsigned, + // which is exactly what an unsigned build should be. val signingProperties = Properties() - val signingFile = File(System.getProperty("user.home"), ".flamenet-android-signing.properties") - if (signingFile.exists()) { - signingFile.inputStream().use { signingProperties.load(it) } - } + val home = File(System.getProperty("user.home")) + val signingFile = listOf( + File(home, ".flamenet-messenger-signing.properties"), + File(home, ".flamenet-android-signing.properties"), + ).firstOrNull { it.exists() } + signingFile?.inputStream()?.use { signingProperties.load(it) } signingConfigs { if (signingProperties.isNotEmpty()) {