Skip to content

Commit 5807b5f

Browse files
committed
fix: add ProGuard rules for ML Kit and update iOS deployment target to 15.0
1 parent 3c1a3ba commit 5807b5f

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

app/android/app/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ android {
3939
// TODO: Add your own signing config for the release build.
4040
// Signing with the debug keys for now, so `flutter run --release` works.
4141
signingConfig = signingConfigs.getByName("debug")
42+
43+
// ProGuard rules for ML Kit and Firebase
44+
proguardFiles(
45+
getDefaultProguardFile("proguard-android-optimize.txt"),
46+
"proguard-rules.pro"
47+
)
4248
}
4349
}
4450

app/android/app/proguard-rules.pro

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Keep Google ML Kit classes
2+
-keep class com.google.mlkit.** { *; }
3+
-dontwarn com.google.mlkit.**
4+
5+
# Keep Firebase classes
6+
-keep class com.google.firebase.** { *; }
7+
-dontwarn com.google.firebase.**
8+
9+
# Keep Google Play Services
10+
-keep class com.google.android.gms.** { *; }
11+
-dontwarn com.google.android.gms.**
12+

app/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@
346346
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
347347
GCC_WARN_UNUSED_FUNCTION = YES;
348348
GCC_WARN_UNUSED_VARIABLE = YES;
349-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
349+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
350350
MTL_ENABLE_DEBUG_INFO = NO;
351351
SDKROOT = iphoneos;
352352
SUPPORTED_PLATFORMS = iphoneos;
@@ -472,7 +472,7 @@
472472
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
473473
GCC_WARN_UNUSED_FUNCTION = YES;
474474
GCC_WARN_UNUSED_VARIABLE = YES;
475-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
475+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
476476
MTL_ENABLE_DEBUG_INFO = YES;
477477
ONLY_ACTIVE_ARCH = YES;
478478
SDKROOT = iphoneos;
@@ -523,7 +523,7 @@
523523
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
524524
GCC_WARN_UNUSED_FUNCTION = YES;
525525
GCC_WARN_UNUSED_VARIABLE = YES;
526-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
526+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
527527
MTL_ENABLE_DEBUG_INFO = NO;
528528
SDKROOT = iphoneos;
529529
SUPPORTED_PLATFORMS = iphoneos;

0 commit comments

Comments
 (0)