Skip to content

[Demo] Don't merge: R8 regression gate catching broad keep rules - #225

Open
AjeshRPai wants to merge 2 commits into
r8-modular-regression-gatefrom
r8-modular-regression-demo
Open

AjeshRPai wants to merge 2 commits into
r8-modular-regression-gatefrom
r8-modular-regression-demo

Conversation

@AjeshRPai

Copy link
Copy Markdown
Contributor

Demo for #219. Do not merge.

Adds overly broad keep rules to two modules, so the R8 regression gate fails and posts its regression comment:

  • watchface/proguard-rules.pro: -keep class com.android.developers.androidify.watchface.** { *; }
  • feature/results/consumer-rules.pro (new, wired up with consumerProguardFiles):
    • -keep class com.android.developers.androidify.results.** { *; }
    • -keep class androidx.compose.** { *; }

Expected result, from a local run:

  • App bundle: the shrinking, optimization and obfuscation scores each drop about 18 pts, and the uncompressed DEX grows about 9 MB (+50%).
  • Libraries: watchface-release.aar (33.15%) and results-release.aar (77.77%) fall below the 90% shrinking minimum.

…on gate

Do not merge. Keeps all of watchface, results, and Compose, so the R8 regression gate fails on the app's R8 scores and DEX size, and on both libraries' shrinking.
@github-actions

Copy link
Copy Markdown

🛡️ R8 Optimization & Shrinking Gate (android analyze)

📦 App Bundle R8 Scores & DEX Size

  • Package: com.android.developers.androidify
  • Compiler: AGP 9.3.2 / R8 9.3.16 (Full Mode: True)
  • Baseline: r8-baseline.json
Metric Baseline Current Delta Threshold Status
Shrinking Score 52.49% 33.55% -18.94% pts max -2.00% pts ❌ FAIL
Optimization Score 52.15% 33.37% -18.78% pts max -2.00% pts ❌ FAIL
Obfuscation Score 52.45% 33.52% -18.93% pts max -2.00% pts ❌ FAIL
Uncompressed DEX Size 17.99 MB 26.18 MB +8.20 MB (+45.6%) max +5.0% / +500KB ❌ FAIL

📚 Library Shrinking Percentage (Min Threshold: 90.0%)

  • Libraries Analyzed: 12 (✅ 10 passed, ⚠️ 0 with package-wide keep rules, ❌ 2 failed)

❌ Library Shrinking Regressions

  • Library results-release.aar DEX shrinking is 77.77% (required >= 90.0%)
  • Library watchface-release.aar DEX shrinking is 33.15% (required >= 90.0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant