-
Type:
Task
-
Resolution: Done
-
Priority:
Low
-
Affects Version/s: None
-
None
-
FLW Sprint 54, FLW Sprint 55
-
FLW Mobile App
-
UAT
R8 is enabled for release, but app/proguard-rules.pro has broad keep rules that switch it off for most of the code:
- -keep class org.piramalswasthya.sakhi.**
{ *; }
keeps the whole app.
- kotlin.*, kotlinx.coroutines., com.google.firebase., com.google.android.gms., okhttp3., retrofit2., moshi.* and org.bouncycastle.** are fully kept.
- -keepclassmembers class **
{ public static <fields>; }
applies to every library.
The debug build has 53 MB of DEX, so the release build is very likely over the 10 MB limit, with optimisation coverage well below 25%.
Scope:
- Remove the broad keep rules. Keep only what is accessed by reflection:
- Moshi and Gson DTOs (model.*, network.*);
- JNI native methods used by KeyUtils;
- classes marked with @Keep.
- Add -keepattributes SourceFile,LineNumberTable and make sure the Crashlytics mapping file is uploaded, so crash reports stay readable.
- Remove the -optimizations and -verbose lines, which R8 doesn't use.
- Optional: enable R8 full mode once the build is stable.
- Add a CI step that builds one release variant when the ProGuard rules or Gradle files change.
Acceptance Criteria:
- [ ] Release DEX size is significantly lower than the Task 1 baseline.
- [ ] Play Console DEX optimisation is at least 25%.
- [ ] Crashlytics stack traces are de-obfuscated correctly.
- [ ] Task 3 regression passes.
- is blocked by
-
FLW-1210 Baseline audit: measure DEX size and Android vitals memory metrics for all production apps
-
- Closed
-