r8-analyzer
Installation
SKILL.md
Step 1. Setup and configuration check
- Inspect
build.gradle,build.gradle.kts, andgradle.properties. - Use references/CONFIGURATION.md to identify missing optimizations.
- AGP : If the version is lower than 9.3, suggest migration to 9.3 for the simplified
optimization {}DSL and the Configuration Analyzer task. - Full mode : Verify
android.enableR8.fullMode=falseis removed from thegradle.propertiesfile.
Step 2. Analysis path selection
-
Inspect
build.gradle,build.gradle.kts,settings.gradle,settings.gradle.kts,gradle.properties, andlibs.versions.tomlto get the AGP and R8 versions. An R8 version pinned insettings.gradle(.kts)replaces the R8 bundled with AGP. -
Find the app module (usually
app) and a build variant with R8 enabled (usuallyrelease). The following commands use them as<module>and<Variant>, for example:app:minifyReleaseWithR8. -
The helper scripts are in this skill's
scripts/directory. In the following commands,<skill_dir>is this skill's directory. Run every command from the project root. -
If AGP >= 9.3.0 : Proceed to Path A (Standalone Task).
-
If AGP < 9.3.0 : Proceed to Path B (Quantitative).