mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-07-04 14:43:13 +02:00
The previous commit disabled isMinifyEnabled/isShrinkResources as a crash workaround (AGP 9 default minification stripped WorkDatabase_Impl's no-arg constructor). This commit adds the proper fix: - new android/app/proguard-rules.pro: keeps the no-arg constructor on all RoomDatabase subclasses (the gap the Room AAR's own consumer rule misses — it keeps the class name but not the reflectively-called constructor), plus WorkManager worker/InputMerger rules re-stated from the work-runtime AAR in case transitive consumer-rule propagation is incomplete through the Flutter plugin wrapper. - build.gradle.kts: re-enables isMinifyEnabled=true + isShrinkResources=true with proguard-android-optimize.txt + proguard-rules.pro. Verified on the real phone (BL9000): minified release APK launches without crash, MainActivity foreground, food-bank suggestions and slot chips render correctly. APK size 52.1 MB (vs 56.9 MB unminified). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWPUBzE24Ls9i9GMRwXnnn |
||
|---|---|---|
| .. | ||
| app | ||
| gradle/wrapper | ||
| .gitignore | ||
| build.gradle.kts | ||
| gradle.properties | ||
| settings.gradle.kts | ||