From 5a6813eaa99b3216fc2389a8a734bf39d54f095a Mon Sep 17 00:00:00 2001 From: Kenny Hu Date: Mon, 10 Mar 2025 10:12:25 -0400 Subject: [PATCH 1/2] add proguard rules to android builds --- android/build.gradle | 1 + android/proguard-rules.pro | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 android/proguard-rules.pro diff --git a/android/build.gradle b/android/build.gradle index 960b634..1793330 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -30,6 +30,7 @@ android { targetSdkVersion 31 versionCode 1 versionName '3.12.3' + consumerProguardFiles 'proguard-rules.pro' } lintOptions { disable 'InvalidPackage' diff --git a/android/proguard-rules.pro b/android/proguard-rules.pro new file mode 100644 index 0000000..70770c2 --- /dev/null +++ b/android/proguard-rules.pro @@ -0,0 +1,4 @@ +-dontwarn com.huawei.** + +-dontwarn com.google.android.play.integrity.** +-dontwarn com.google.android.play.core.integrity.** From 36654cf7d8b5af6bae48374ef9a33acae2a98611 Mon Sep 17 00:00:00 2001 From: Kenny Hu Date: Tue, 1 Apr 2025 15:56:55 -0400 Subject: [PATCH 2/2] run R8 in example builds --- android/proguard-rules.pro | 2 +- example/android/app/build.gradle | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/android/proguard-rules.pro b/android/proguard-rules.pro index 70770c2..e9d9ae2 100644 --- a/android/proguard-rules.pro +++ b/android/proguard-rules.pro @@ -1,4 +1,4 @@ --dontwarn com.huawei.** +--dontwarn com.huawei.** -dontwarn com.google.android.play.integrity.** -dontwarn com.google.android.play.core.integrity.** diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 8cd0435..35ae95e 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -45,6 +45,8 @@ android { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug + minifyEnabled true + shrinkResources true } }