What problem does it solve?
R8 keep rules can accidentally become redundant or overly broad, preventing code shrinking and increasing app size, especially when troubleshooting Proguard/R8 behavior across app and library boundaries.
Core Features & Use Cases
- Build & R8 configuration review: Inspects Gradle build scripts and properties to catch missing release optimizations and full-mode configuration issues.
- R8 rule impact analysis: Uses either quantitative analysis (via generated reports) or a heuristic review to identify redundant rules, overly broad package-wide patterns, and library consumer subsumption opportunities.
- Change validation guidance: Produces an output report format suitable for evaluating example impacted classes and rule impacts, with validation suggestions for proposed changes.
Use Case Example: You suspect your proguard-rules.pro contains package-wide keep patterns or old manual rules that duplicate library-provided consumer rules; use this skill to locate and prioritize what to remove or refine to recover shrinking.
Quick Start
Run r8-analyzer against your Android project’s release build configuration and proguard-rules.pro to generate a Markdown report of rule redundancies and impact metrics.