2525-keep class com.google.gson.** { *; }
2626-dontwarn com.google.gson.**
2727
28- # 4. FLUTTER ENGINE & NATIVE PLUGINS INTEGRATION (Minimized optimization scope)
29- # Keep the core embedding engine classes required for application initialization
30- -keep class io.flutter.embedding.** { *; }
28+ # 4. FLUTTER ENGINE & NATIVE PLUGINS INTEGRATION (Optimized optimization scope)
29+ # REPLACED BROAD EMBEDDING KEEP RULE: Allows R8 to strip unused embedding classes (like SplitInstall)
30+ # while safely preserving the core infrastructure used during app startup.
31+ -keep class io.flutter.embedding.engine.FlutterJNI { *; }
32+ -keep class io.flutter.embedding.engine.loader.FlutterLoader { *; }
33+ -keep class io.flutter.embedding.android.FlutterActivity { *; }
34+ -keep class io.flutter.embedding.android.FlutterFragment { *; }
35+ -keep class io.flutter.embedding.android.FlutterView { *; }
3136-keep class io.flutter.plugin.** { *; }
3237-keep class io.flutter.util.** { *; }
3338-keep class io.flutter.view.** { *; }
3439
35- # 5. FOSS COMPLIANCE: PLAY CORE HOOKS SILENCING
40+ # 5. FOSS COMPLIANCE & DEFERRED COMPONENTS REMOVAL
41+ # Correct R8 syntax to mark the Play Store manager and listeners as entry points that CAN be shrunk/deleted
42+ -keep,allowshrinking class io.flutter.embedding.engine.deferredcomponents.PlayStoreDeferredComponentManager { *; }
43+ -keep,allowshrinking class io.flutter.embedding.engine.deferredcomponents.PlayStoreDeferredComponentManager$FeatureInstallStateUpdatedListener { *; }
44+
3645# Tells R8 to safely ignore missing Google Play binary symbols without packing non-free SDKs
3746-dontwarn com.google.android.play.core.**
3847-dontwarn io.flutter.embedding.engine.deferredcomponents.**
4352 public static int d(...);
4453 public static int i(...);
4554 public static int w(...);
46- }
55+ }
0 commit comments