Enable R8 minification and shrinking for release builds #12

Merged
fredo merged 1 commit from feature/enable-r8-obfuscation into main 2026-09-13 12:31:45 +02:00
Owner

Sets isMinifyEnabled = true and isShrinkResources = true so the release
APK/AAB passes Google Play's ≥25% obfuscation requirement.

ProGuard keep rules added for the three things R8 cannot safely rename:

  • Gson model classes (Medication, VersionInfo, LanguageData) whose field
    names must match JSON keys since Gson uses reflection
  • UpdateWorker, whose class name is resolved by string at WorkManager
    startup

Room, Retrofit, OkHttp, Compose, and WorkManager all ship their own
consumer ProGuard rules inside their AARs, so no manual rules are needed
for those libraries.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Sets isMinifyEnabled = true and isShrinkResources = true so the release APK/AAB passes Google Play's ≥25% obfuscation requirement. ProGuard keep rules added for the three things R8 cannot safely rename: - Gson model classes (Medication, VersionInfo, LanguageData) whose field names must match JSON keys since Gson uses reflection - UpdateWorker, whose class name is resolved by string at WorkManager startup Room, Retrofit, OkHttp, Compose, and WorkManager all ship their own consumer ProGuard rules inside their AARs, so no manual rules are needed for those libraries. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sets isMinifyEnabled = true and isShrinkResources = true so the release
APK/AAB passes Google Play's ≥25% obfuscation requirement.

ProGuard keep rules added for the three things R8 cannot safely rename:
- Gson model classes (Medication, VersionInfo, LanguageData) whose field
  names must match JSON keys since Gson uses reflection
- UpdateWorker, whose class name is resolved by string at WorkManager
  startup

Room, Retrofit, OkHttp, Compose, and WorkManager all ship their own
consumer ProGuard rules inside their AARs, so no manual rules are needed
for those libraries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fredo merged commit b424414dee into main 2026-09-13 12:31:45 +02:00
fredo deleted branch feature/enable-r8-obfuscation 2026-09-13 12:32:43 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
fredo/Compendium!12
No description provided.