r8-analyzer
/r8-analyzer
Analizuje pliki budowania Androida i reguły keep R8, wskazując nadmiarowe i zbyt szerokie reguły oraz te pokryte regułami bibliotek.
- Autor
- hanamizuki ↗
- Repozytorium
- solopreneur ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 13.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 10
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 13.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Analizuje pliki budowania Androida i reguły keep R8, wskazując nadmiarowe i zbyt szerokie reguły oraz te pokryte regułami bibliotek.
Oryginalny opis (EN)
Analyzes Android build files and R8 keep rules to identify redundancies, broad package-wide rules, and rules that subsume library consumer keep rules. Use when developers want to optimize their app's size, remove redundant or overly broad keep rules, or troubleshoot Proguard configurations.
Jak działa
- Step 1. Setup and configuration check
- Step 2. Analysis path selection
- Step 3. Report generation
- Constraints
Podgląd SKILL.md
--- name: r8-analyzer description: Analyzes Android build files and R8 keep rules to identify redundancies, broad package-wide rules, and rules that subsume library consumer keep rules. Use when developers want to optimize their app's size, remove redundant or overly broad keep rules, or troubleshoot Proguard configurations. license: Complete terms in LICENSE.txt metadata: author: Google LLC last-updated: '2026-08-06' keywords: - R8 - proguard - keep rules - app size - optimization --- ## Step 1. Setup and configuration check - Inspect `build.gradle`, `build.gradle.kts`, and `gradle.properties`. - Use [references/CONFIGURATION.md](references/CONFIGURATION.md) to identify missing optimizations. - **AGP** : If version is lower than 9.0, suggest migration to 9.0 for [build-time performance improvement](references/android/topic/performance/app-optimization/enable-app-optimization.md). - **Full Mode** : Verify `android.enableR8.fullMode=false` is removed from gradle.properties. ## Step 2. Analysis path selection - Inspect `build.gradle`, `build.gradle.kts`, `gradle.properties`, `libs.versions.toml`, and the top-level `settings.gradle` or `settings.gradle.kts` to get the AGP and R8 versions. An explicit `com.android.tools:r8` version in the settings file overrides the version embedded in AGP. - **If AGP \>= 9.3.0** : Proceed to **Path A (Standalone Task)**. - **If AGP \< 9.3.0 and R8 \>= 9.3.7-dev** : Proceed to **Path B (Quantitative)**. - If none of the conditions are met, proceed to **Path C (Heuristic)**. ### Path A: Standalone Gradle task (AGP \>= 9.3.0) - **Step 1: Run standalone task** : Run `./gradlew :app:analyzeReleaseR8Config` to evaluate the R8 configuration. You MUST wait for this command to finish before proceeding. - **Step 2: Analyze** : Read the generated HTML report at `app/build/reports/r8/r8-config-analyzer-release.html` for scores and rule impact metrics. ### Path B: Quantitative data generation (R8 \>= 9.3.7-dev and AGP \< 9.3.0) - **Step 1: Generate report** : Run `mkdir -p "$PWD/tmp/r8analysis" && ./gradlew assembleRelease -Dcom.android.tools.r8.dumpkeepradiushtmltodirectory="$PWD/tmp/r8analysis"`. You MUST wait for this command to finish before proceeding. - **Step 2: Analyze** : Read the generated HTML report in `tmp/r8analysis/` for scores and rule impact metrics. ### Path C: Heuristic evaluation and recommendation (R8 \< 9.3.7-dev) *(Use ONLY if quantitative data generation is not possible)* - **Step 1: Manual evaluation** : Inspect `proguard-rules.pro`. - **Step 2: Library check** : Compare rules against [references/REDUNDANT-RULES.md](references/REDUNDANT-RULES.md). Suggest **Remove** for bundled rules. - **Step 3: Custom rule check** : Use [references/KEEP-RULES-IMPACT-HIERARCHY.md](references/KEEP-RULES-IMPACT-HIERARCHY.md) and [references/REFLECTION-GUIDE.md](references/REFLECTION-GUIDE.md) to prioritize and evaluate. Suggest **Refine** for broad rules (for example, package-wide). - **Step 4: Validation** : Suggest Macrobenchmark tests using [UI Automator](references/android/training/testing/other-components/ui-automator.md) for any proposed changes. Proceed to Step 3. ## Step 3. Report generation - **Format** : Follow [references/REPORT_FORMAT.md](references/REPORT_FORMAT.md) strictly. - **Input**: Extract metrics (Scores, Impacts, Example Classes) from the generated HTML report if using Path A or Path B, or from manual findings if using Path C. - **Output** : Output ONLY the raw Markdown report in the chat. Do NOT output conversational filler (for example, "Here is your report..."). Do NOT provide recommendations, next steps, or any other text outside of the sections defined in [references/REPORT_FORMAT.md](references/REPORT_FORMAT.md) Do NOT mention the path used for analysis of the configuration ## Constraints - **Strict output limit**: The final output MUST strictly be the Markdown report and nothing else. - **No code changes**: Research and suggest only; Do not modify files. - **No redundancy**: Do not explain R8 benefits or reference skill internal files in the report. - **Focus**: Omit sections (for example, Subsumed Rules, Configuration) if no issues or items are found.
Pliki w paczce (10)
- SKILL.md 4 KB
- _VENDOR.md 1 KB
- references/CONFIGURATION-ANALYZER.md 17 KB
- references/CONFIGURATION.md 1 KB
- references/KEEP-RULES-IMPACT-HIERARCHY.md 3 KB
- references/REDUNDANT-RULES.md 8 KB
- references/REFLECTION-GUIDE.md 4 KB
- references/REPORT_FORMAT.md 2 KB
- references/android/topic/performance/app-optimization/enable-app-optimization.md 16 KB
- references/android/training/testing/other-components/ui-automator.md 14 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · hanamizuki/solopreneur | 100 | MIT |
| android/skills | 100 | Apache-2.0 |
| hamzabellouch/agent-skills | 100 | MIT |
| TalissonVitorino/kmp-ios-skills | 100 | MIT |
Identyczna treść występuje jeszcze w 2 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 13.11.2026 · wersja paczki b540c52c32a5 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100complexity-analyzer
Analizuje złożoność cyklomatyczną i kognitywną, wskazując funkcje zbyt złożone i wymagające uproszczenia. - 100meziantou-analyzer
Wykorzystuje bezpłatny pakiet Meziantou.Analyzer z regułami projektowymi, użycia, bezpieczeństwa, wydajności i stylu dla .NET, jako szerszy zestaw analizatorów w jednym pakiecie NuGet. - 100bundle-size-analyzer
Analizuje rozmiar paczki (bundle) w projekcie frontendowym i pomaga znaleźć elementy, które ją powiększają. - 100value-cleaner
Usuwa z kodu, testów, reguł i dokumentów zbędną logikę, nadmiarowe sprawdzenia, wypełniacz i treści bez wartości. - 100code-documentation-analyzer
Prawdopodobnie analizuje i audytuje dokumentację kodu pod kątem kompletności i jakości. - 100test-deduplicator
Analizuje zestawy testów, by znaleźć zbędne i zduplikowane przypadki na podstawie pokrycia, podobieństwa semantycznego i wyników wykonania, co skraca czas testów.