r8-analyzer

Analyzes Android Gradle build inputs and R8/Proguard keep rules to generate a report with scores and keep-rule evaluation.

174|8|Updated Jan 9, 2024
One-click install
npx skills add https://github.com/klxiaoniu/QQVersionList --skill r8-analyzer-klxiaoniu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: r8-analyzer
Source: https://github.com/klxiaoniu/QQVersionList/tree/main/.agents/skills/r8-analyzer
Command: npx skills add https://github.com/klxiaoniu/QQVersionList --skill r8-analyzer-klxiaoniu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you identify redundant or overly broad R8/Proguard keep rules that block shrinking/optimization, so your Android app can be smaller and easier to maintain.

Core Features & Use Cases

  • R8 configuration inspection: Reviews Gradle/AGP settings (including R8 full mode) and release optimization configuration to catch misconfiguration patterns.
  • Quantitative impact analysis (when supported): Uses the R8 Configuration Analyzer pipeline to generate analysis artifacts and compute optimization/shrinking/obfuscation scores and rule impacts.
  • Heuristic recommendations (fallback): When quantitative analysis isn’t possible, it evaluates keep rules for broad package-wide patterns, subsumption, and likely redundancy against reference guidance.
  • Actionable reporting: Produces a report in a strict format, focusing on keep-rule evaluation, removed/refined actions, and subsumed-rule findings.

Quick Start

Run the r8-analyzer skill for your Android project to generate a report identifying keep rules that can be removed or refined to improve R8 optimizations.

Frequently Asked Questions about r8-analyzer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find redundant Proguard keep rules in my Android release build?▼

To find redundant Proguard keep rules in an Android release build, analyze R8 configuration inputs and keep rules to identify package-wide or subsuming patterns that block shrinking and optimization.

What is R8 keep rule subsumption and how does it affect app size optimization?▼

R8 keep rule subsumption occurs when a broad rule entirely covers a specific one, making the specific rule redundant. Removing these subsumed rules improves R8 shrinking and app size optimization.

Can I analyze R8 configuration quality without using R8 full mode?▼

Yes, you can analyze R8 configuration quality without full mode. The analysis selects a heuristic fallback path to evaluate keep rules when quantitative analysis isn't supported by the R8 version.

How do I troubleshoot R8 shrinking issues caused by overly broad keep rules?▼

Troubleshoot R8 shrinking issues by inspecting Gradle, AGP, and R8 settings to catch misconfigurations, then evaluate keep rules for broad package-wide patterns that prevent code removal.

Does the R8 Configuration Analyzer support quantitative impact scoring for keep rules?▼

Yes, when the R8 version supports it, the Configuration Analyzer pipeline generates analysis artifacts to compute optimization, shrinking, and obfuscation scores alongside specific keep-rule impacts.

What format does the R8 keep rule analysis report follow?▼

The R8 keep rule analysis report follows a strict format that includes keep-rule evaluations, scores, subsumed-rule findings, and actionable steps for removing or refining unnecessary configurations.