diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index fff7ac8..7293162 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -48,6 +48,11 @@ android { } release { if (releaseStoreFile != null) signingConfig = signingConfigs.getByName("release") + // SPEC §10.6: R8 shrinks, optimises and obfuscates the release APK; the libraries' consumer rules plus + // proguard-rules.pro. publish-apk.sh keeps build/outputs/mapping/release/mapping.txt next to the APK. + isMinifyEnabled = true + isShrinkResources = true + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") } } sourceSets { diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro new file mode 100644 index 0000000..ef43999 --- /dev/null +++ b/android/app/proguard-rules.pro @@ -0,0 +1,3 @@ +# R8 rules for the release build of :app (SPEC §10.6). The libraries in use (kotlinx.serialization, Room 3, Hilt, +# Ktor, OkHttp, WorkManager, Firebase messaging, Coil) ship their own consumer rules; add a rule here only for a +# failure that was seen and with the reason beside it.