diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index f190540b..eeb39df2 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -77,6 +77,12 @@ android { buildTypes { getByName("release") { + isMinifyEnabled = true + isShrinkResources = true + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro", + ) val releaseSigningConfig = signingConfigs.getByName("release") signingConfig = if (keystorePropertiesExists && releaseSigningConfig.storeFile != null) { releaseSigningConfig diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro index ea6dd795..a2d72665 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -29,4 +29,15 @@ -keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken -keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken -##---------------End: proguard configuration for Gson ---------- \ No newline at end of file +##---------------End: proguard configuration for Gson ---------- + +##---------------Begin: androidx.window ---------- +# androidx.window (pulled in transitively, e.g. via the Flutter embedding / WebView) +# references optional OEM-provided window-management extension and sidecar classes +# reflectively. They are not present at compile time, so R8 flags them as missing. +# Suppressing is safe: the classes are supplied by the device at runtime (or absent, +# in which case the library gracefully falls back). See missing_rules.txt generated by +# R8 at build/app/outputs/mapping/normalRelease/missing_rules.txt. +-dontwarn androidx.window.extensions.** +-dontwarn androidx.window.sidecar.** +##---------------End: androidx.window ---------- \ No newline at end of file