reis-mobile 0.3.6 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +24 -0
- package/README.md +175 -168
- package/THIRD_PARTY_NOTICES.md +224 -4
- package/agents/android-architect.md +89 -0
- package/agents/android-performance-engineer.md +92 -0
- package/agents/android-test-engineer.md +97 -0
- package/agents/flutter-test-engineer.md +2 -0
- package/agents/ios-architect.md +93 -0
- package/agents/ios-performance-engineer.md +92 -0
- package/agents/ios-test-engineer.md +95 -0
- package/agents/lead-mobile.md +10 -1
- package/agents/mobile-staff-engineer.md +1 -1
- package/agents/rn-architect.md +94 -0
- package/agents/rn-performance-engineer.md +92 -0
- package/agents/rn-test-engineer.md +98 -0
- package/bin/reis-mobile.mjs +59 -17
- package/commands/debate.md +10 -1
- package/commands/debug.md +60 -0
- package/commands/reis-mobile.md +7 -2
- package/core/config/project.mjs +59 -0
- package/core/registry/frontmatter.mjs +15 -4
- package/core/registry/registry.mjs +21 -1
- package/core/router/intents.mjs +2 -0
- package/core/router/router.mjs +10 -5
- package/package.json +1 -1
- package/skills/android-adaptive/SKILL.md +304 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/container-behavior.md +112 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/get-started.md +69 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/index.md +81 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/item-behavior.md +170 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/container-properties.md +415 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/get-started.md +51 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/index.md +73 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/item-properties.md +170 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/mediaquery/index.md +333 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/tooling/debug.md +114 -0
- package/skills/android-adaptive/references/android/guide/navigation/navigation-3/recipes/material-listdetail.md +141 -0
- package/skills/android-agp-9-upgrade/SKILL.md +106 -0
- package/skills/android-agp-9-upgrade/references/android/build/migrate-to-built-in-kotlin.md +416 -0
- package/skills/android-agp-9-upgrade/references/android/build/releases/agp-9-0-0-release-notes.md +554 -0
- package/skills/android-agp-9-upgrade/references/buildconfig.md +54 -0
- package/skills/android-agp-9-upgrade/references/ksp-kapt.md +39 -0
- package/skills/android-agp-9-upgrade/references/paparazzi-gradle-9.md +30 -0
- package/skills/android-agp-9-upgrade/references/recipes.md +62 -0
- package/skills/android-appfunctions/SKILL.md +74 -0
- package/skills/android-appfunctions/references/adb-interaction-testing.md +95 -0
- package/skills/android-appfunctions/references/context.md +26 -0
- package/skills/android-appfunctions/references/feature-discovery-analysis.md +71 -0
- package/skills/android-appfunctions/references/implementation-configuration.md +282 -0
- package/skills/android-appfunctions/references/kdoc-refinement-optimization.md +75 -0
- package/skills/android-appfunctions/references/migrate-to-service-entry-point.md +226 -0
- package/skills/android-camerax/SKILL.md +135 -0
- package/skills/android-camerax/references/camera1-to-camerax.md +198 -0
- package/skills/android-camerax/references/camera2-to-camerax.md +193 -0
- package/skills/android-camerax/references/expert-blueprints.md +58 -0
- package/skills/android-camerax/references/foldables.md +83 -0
- package/skills/android-camerax/references/immutability.md +60 -0
- package/skills/android-camerax/references/low-light.md +124 -0
- package/skills/android-camerax/references/mlkit-spatial.md +75 -0
- package/skills/android-camerax/references/modern-apis.md +42 -0
- package/skills/android-camerax/references/testing.md +69 -0
- package/skills/android-camerax/references/thermals.md +85 -0
- package/skills/android-camerax/references/wear-os.md +76 -0
- package/skills/android-camerax/references/xr.md +54 -0
- package/skills/android-cli/SKILL.md +474 -0
- package/skills/android-cli/references/interact.md +113 -0
- package/skills/android-cli/references/journeys.md +120 -0
- package/skills/android-code-review/SKILL.md +58 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/SKILL.md +340 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/design/ui/ai-glasses/guides/interaction/inputs.md +67 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/access-hardware-projected-context.md +388 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/buttons.md +139 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/cards.md +148 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/focus.md +107 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/icons.md +90 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/text.md +69 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/title-chips.md +82 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/request-hardware-permissions.md +213 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/button-samples-source.md +176 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/button-source.md +203 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/card-samples-source.md +296 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/card-source.md +515 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/deptheffect-source.md +224 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/deptheffectlevels-source.md +105 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/glimmersansflextypography-source.md +270 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/glimmertheme-source.md +182 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/icon-source.md +388 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/iconbutton-source.md +126 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/iconsizes-source.md +78 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/list-source.md +27 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/listitem-source.md +272 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/liststate-source.md +427 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/material-hct-source.md +217 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/projectedcontext-source.md +265 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stack-source.md +368 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stackitemscope-source.md +440 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stackstate-source.md +325 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/surface-source.md +1211 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/titlechip-samples-source.md +101 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/titlechip-source.md +131 -0
- package/skills/android-edge-to-edge/SKILL.md +429 -0
- package/skills/android-engage-sdk-integration/SKILL.md +130 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/faq.md +439 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/food.md +1149 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/healthandfitness.md +1055 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/listen.md +1050 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/otherverticals.md +1301 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/read.md +910 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/shopping.md +1224 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/social.md +719 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/travel.md +1413 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/continue-watching/index.md +19 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/entitlements.md +353 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/getting-started.md +202 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/recommendations.md +471 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/watch.md +1081 -0
- package/skills/android-engage-sdk-integration/references/clusters.md +154 -0
- package/skills/android-engage-sdk-integration/references/common.md +519 -0
- package/skills/android-engage-sdk-integration/references/patterns.md +527 -0
- package/skills/android-engage-sdk-integration/references/requests.md +260 -0
- package/skills/android-engage-sdk-integration/references/schemas/food.md +509 -0
- package/skills/android-engage-sdk-integration/references/schemas/listen.md +842 -0
- package/skills/android-engage-sdk-integration/references/schemas/other.md +220 -0
- package/skills/android-engage-sdk-integration/references/schemas/read.md +412 -0
- package/skills/android-engage-sdk-integration/references/schemas/shopping.md +357 -0
- package/skills/android-engage-sdk-integration/references/schemas/social.md +228 -0
- package/skills/android-engage-sdk-integration/references/schemas/travel.md +923 -0
- package/skills/android-engage-sdk-integration/references/schemas/tv.md +1226 -0
- package/skills/android-engage-sdk-integration/references/schemas/watch.md +1137 -0
- package/skills/android-engage-sdk-integration/references/troubleshooting.md +39 -0
- package/skills/android-gradle-build-debug/SKILL.md +71 -0
- package/skills/android-intent-security/SKILL.md +550 -0
- package/skills/android-leanback-to-compose-tv-migration/SKILL.md +743 -0
- package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/get-started/navigation.md +372 -0
- package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/playback/compose/browse.md +243 -0
- package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/playback/compose/index.md +153 -0
- package/skills/android-media3-cast-integration/SKILL.md +236 -0
- package/skills/android-media3-cast-integration/references/android/media/media3/cast/create-castplayer.md +390 -0
- package/skills/android-media3-cast-integration/references/android/media/media3/cast/customize-castoptions.md +93 -0
- package/skills/android-media3-cast-integration/references/android/media/media3/cast/index.md +21 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/SKILL.md +127 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/analysis-of-the-project-and-layout.md +42 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/designsystems/migrate-xml-theme-to-compose.md +171 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/migrate/interoperability-apis/compose-in-views.md +299 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/migrate/interoperability-apis/views-in-compose.md +286 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/setup-compose-dependencies-and-compiler.md +197 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/identify-optimal-xml-candidate.md +31 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/xml-layout-migration.md +86 -0
- package/skills/android-ml-kit-genai-prompt-api/SKILL.md +124 -0
- package/skills/android-ml-kit-genai-prompt-api/references/get-started.md +272 -0
- package/skills/android-ml-kit-genai-prompt-api/references/prefix-caching.md +146 -0
- package/skills/android-ml-kit-genai-prompt-api/references/prompt-design.md +55 -0
- package/skills/android-ml-kit-genai-prompt-api/references/prompt-optimization.md +74 -0
- package/skills/android-ml-kit-genai-prompt-api/references/structured-output.md +219 -0
- package/skills/android-ml-kit-genai-prompt-api/references/system-instructions.md +71 -0
- package/skills/android-navigation-3/SKILL.md +122 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/index.md +51 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/migration-guide.md +670 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/animations.md +147 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basic.md +89 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basicdsl.md +85 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basicsaveable.md +90 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/bottomsheet.md +195 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/common-ui.md +200 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/conditional-transitions.md +182 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/conditional.md +230 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-custommatcher.md +176 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-staticuri.md +140 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-syntheticbackstack.md +184 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/dialog.md +107 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/lifecycle-owner.md +185 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/material-listdetail.md +141 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/material-supportingpane.md +145 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/modular-hilt.md +283 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/modular-koin.md +287 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/multiple-backstacks.md +468 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/passingarguments.md +371 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/results-event.md +273 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/results-state.md +266 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/scenes-listdetail.md +435 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/scenes-twopane.md +244 -0
- package/skills/android-navigation-3/references/android/guide/navigation/type-safe-destinations.md +129 -0
- package/skills/android-navigation-event/SKILL.md +312 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/dispatcher.md +134 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/handle-back.md +217 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/index.md +83 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/setup.md +32 -0
- package/skills/android-play-billing-library-version-upgrade/SKILL.md +96 -0
- package/skills/android-play-billing-library-version-upgrade/references/android/google/play/billing/release-notes.md +1240 -0
- package/skills/android-play-billing-library-version-upgrade/references/migration-logic.md +78 -0
- package/skills/android-play-billing-library-version-upgrade/references/version-checklist.md +54 -0
- package/skills/android-play-policy-insights/SKILL.md +172 -0
- package/skills/android-play-policy-insights/resources/common_mandates.md +100 -0
- package/skills/android-play-policy-insights/resources/compliance_report_template.md +59 -0
- package/skills/android-play-policy-insights/resources/critic.md +86 -0
- package/skills/android-play-policy-insights/resources/goal_data_safety.md +212 -0
- package/skills/android-play-policy-insights/resources/goal_permissions_and_apis.md +459 -0
- package/skills/android-play-policy-insights/resources/goal_user_account.md +106 -0
- package/skills/android-play-policy-insights/resources/policies.json +321 -0
- package/skills/android-play-policy-insights/resources/scanner_config.json +843 -0
- package/skills/android-play-policy-insights/scripts/generate_report.py +860 -0
- package/skills/android-play-policy-insights/scripts/orchestrator.py +1313 -0
- package/skills/android-play-policy-insights/scripts/play_store_scraper.py +410 -0
- package/skills/android-play-policy-insights/scripts/scanner.py +261 -0
- package/skills/android-play-policy-insights/scripts/template_engine.py +243 -0
- package/skills/android-profiler/SKILL.md +60 -0
- package/skills/android-profiler/analysis/analysis_orchestrator.md +32 -0
- package/skills/android-profiler/analysis/workflows/perfetto-sql/perfetto_sql.md +28 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/perfetto_trace_analysis.md +121 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/guiding_principles.md +51 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/domain_hints_template.md +7 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_cpu.md +56 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_graphics.md +51 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_io.md +46 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_ipc.md +41 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_memory.md +55 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_power.md +33 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/per_candidate_analysis.md +172 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/triage.md +94 -0
- package/skills/android-profiler/recording/recording_orchestrator.md +36 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/perfetto_trace_recording.md +148 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/app_jank.pftxt +43 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/cpu_profile.pftxt +35 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/java_heap_dump.pftxt +21 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/long_background.pftxt +37 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/memory_counters.pftxt +45 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/native_heap.pftxt +21 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/sched_cpu.pftxt +33 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/trace_config_reference.md +102 -0
- package/skills/android-profiler/references/env_setup.md +15 -0
- package/skills/android-profiler/references/perfetto/setup.md +29 -0
- package/skills/android-profiler/references/perfetto/sql.md +327 -0
- package/skills/android-r8-analyzer/SKILL.md +72 -0
- package/skills/android-r8-analyzer/references/CONFIGURATION-ANALYZER.md +287 -0
- package/skills/android-r8-analyzer/references/CONFIGURATION.md +44 -0
- package/skills/android-r8-analyzer/references/KEEP-RULES-IMPACT-HIERARCHY.md +83 -0
- package/skills/android-r8-analyzer/references/REDUNDANT-RULES.md +222 -0
- package/skills/android-r8-analyzer/references/REFLECTION-GUIDE.md +139 -0
- package/skills/android-r8-analyzer/references/REPORT_FORMAT.md +51 -0
- package/skills/android-r8-analyzer/references/android/topic/performance/app-optimization/enable-app-optimization.md +252 -0
- package/skills/android-r8-analyzer/references/android/training/testing/other-components/ui-automator.md +312 -0
- package/skills/android-restore-credentials/SKILL.md +359 -0
- package/skills/android-restore-credentials/references/android/guide/topics/manifest/application-element.md +832 -0
- package/skills/android-restore-credentials/references/android/identity/passkeys/create-passkeys.md +327 -0
- package/skills/android-restore-credentials/references/android/identity/passkeys/sign-in-with-passkeys.md +219 -0
- package/skills/android-styles/SKILL.md +229 -0
- package/skills/android-styles/references/android/develop/ui/compose/designsystems/custom.md +459 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/fundamentals.md +421 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/state-animations.md +461 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/styles-vs-modifiers.md +48 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/theming.md +269 -0
- package/skills/android-verified-email/SKILL.md +432 -0
- package/skills/android-verified-email/references/android/identity/credential-manager/index.md +67 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/credential-verifier.md +166 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/email-verification-implementation.md +313 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/email-verification.md +158 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/index.md +112 -0
- package/skills/android-verified-email/references/android/identity/passkeys/create-passkeys.md +327 -0
- package/skills/android-verified-email/references/android/identity/sign-in/credential-manager-webview.md +84 -0
- package/skills/android-wear-compose-m3/SKILL.md +365 -0
- package/skills/android-wear-compose-m3/references/android/training/wearables/compose/migrate-to-material3.md +677 -0
- package/skills/android-wear-compose-m3/references/foundation/AmbientModeSample.kt.md +123 -0
- package/skills/android-wear-compose-m3/references/foundation/AmbientModeSample.kt.md.txt +123 -0
- package/skills/android-wear-compose-m3/references/foundation/CurvedWorldSample.kt.md +430 -0
- package/skills/android-wear-compose-m3/references/foundation/CurvedWorldSample.kt.md.txt +430 -0
- package/skills/android-wear-compose-m3/references/foundation/ExpandableSample.kt.md +99 -0
- package/skills/android-wear-compose-m3/references/foundation/ExpandableSample.kt.md.txt +99 -0
- package/skills/android-wear-compose-m3/references/foundation/HierarchicalFocusSample.kt.md +141 -0
- package/skills/android-wear-compose-m3/references/foundation/HierarchicalFocusSample.kt.md.txt +141 -0
- package/skills/android-wear-compose-m3/references/foundation/PagerSamples.kt.md +56 -0
- package/skills/android-wear-compose-m3/references/foundation/PagerSamples.kt.md.txt +56 -0
- package/skills/android-wear-compose-m3/references/foundation/RotarySamples.kt.md +153 -0
- package/skills/android-wear-compose-m3/references/foundation/RotarySamples.kt.md.txt +153 -0
- package/skills/android-wear-compose-m3/references/foundation/ScalingLazyColumnSample.kt.md +131 -0
- package/skills/android-wear-compose-m3/references/foundation/ScalingLazyColumnSample.kt.md.txt +131 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToDismissBoxSample.kt.md +169 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToDismissBoxSample.kt.md.txt +169 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToRevealSample.kt.md +282 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToRevealSample.kt.md.txt +282 -0
- package/skills/android-wear-compose-m3/references/foundation/TransformingLazyColumnSample.kt.md +335 -0
- package/skills/android-wear-compose-m3/references/foundation/TransformingLazyColumnSample.kt.md.txt +335 -0
- package/skills/android-wear-compose-m3/references/material3/AlertDialogSample.kt.md +377 -0
- package/skills/android-wear-compose-m3/references/material3/AlertDialogSample.kt.md.txt +377 -0
- package/skills/android-wear-compose-m3/references/material3/AnimatedTextSample.kt.md +165 -0
- package/skills/android-wear-compose-m3/references/material3/AnimatedTextSample.kt.md.txt +165 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonGroupSample.kt.md +91 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonGroupSample.kt.md.txt +91 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonSample.kt.md +496 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonSample.kt.md.txt +496 -0
- package/skills/android-wear-compose-m3/references/material3/CardSample.kt.md +470 -0
- package/skills/android-wear-compose-m3/references/material3/CardSample.kt.md.txt +470 -0
- package/skills/android-wear-compose-m3/references/material3/CheckboxButtonSample.kt.md +67 -0
- package/skills/android-wear-compose-m3/references/material3/CheckboxButtonSample.kt.md.txt +67 -0
- package/skills/android-wear-compose-m3/references/material3/ConfirmationDialogSample.kt.md +162 -0
- package/skills/android-wear-compose-m3/references/material3/ConfirmationDialogSample.kt.md.txt +162 -0
- package/skills/android-wear-compose-m3/references/material3/CurvedTextSamples.kt.md +78 -0
- package/skills/android-wear-compose-m3/references/material3/CurvedTextSamples.kt.md.txt +78 -0
- package/skills/android-wear-compose-m3/references/material3/DatePickerSample.kt.md +131 -0
- package/skills/android-wear-compose-m3/references/material3/DatePickerSample.kt.md.txt +131 -0
- package/skills/android-wear-compose-m3/references/material3/DynamicColorSchemeSample.kt.md +74 -0
- package/skills/android-wear-compose-m3/references/material3/DynamicColorSchemeSample.kt.md.txt +74 -0
- package/skills/android-wear-compose-m3/references/material3/EdgeButtonSample.kt.md +63 -0
- package/skills/android-wear-compose-m3/references/material3/EdgeButtonSample.kt.md.txt +63 -0
- package/skills/android-wear-compose-m3/references/material3/FadingExpandingLabelSample.kt.md +60 -0
- package/skills/android-wear-compose-m3/references/material3/FadingExpandingLabelSample.kt.md.txt +60 -0
- package/skills/android-wear-compose-m3/references/material3/IconButtonSample.kt.md +125 -0
- package/skills/android-wear-compose-m3/references/material3/IconButtonSample.kt.md.txt +125 -0
- package/skills/android-wear-compose-m3/references/material3/IconToggleButtonSample.kt.md +116 -0
- package/skills/android-wear-compose-m3/references/material3/IconToggleButtonSample.kt.md.txt +116 -0
- package/skills/android-wear-compose-m3/references/material3/LevelIndicatorSample.kt.md +68 -0
- package/skills/android-wear-compose-m3/references/material3/LevelIndicatorSample.kt.md.txt +68 -0
- package/skills/android-wear-compose-m3/references/material3/LinearProgressIndicatorSample.kt.md +50 -0
- package/skills/android-wear-compose-m3/references/material3/LinearProgressIndicatorSample.kt.md.txt +50 -0
- package/skills/android-wear-compose-m3/references/material3/ListHeaderSample.kt.md +177 -0
- package/skills/android-wear-compose-m3/references/material3/ListHeaderSample.kt.md.txt +177 -0
- package/skills/android-wear-compose-m3/references/material3/OneHandedGestureSamples.kt.md +651 -0
- package/skills/android-wear-compose-m3/references/material3/OneHandedGestureSamples.kt.md.txt +651 -0
- package/skills/android-wear-compose-m3/references/material3/OpenOnPhoneDialogSample.kt.md +57 -0
- package/skills/android-wear-compose-m3/references/material3/OpenOnPhoneDialogSample.kt.md.txt +57 -0
- package/skills/android-wear-compose-m3/references/material3/PageIndicatorSample.kt.md +110 -0
- package/skills/android-wear-compose-m3/references/material3/PageIndicatorSample.kt.md.txt +110 -0
- package/skills/android-wear-compose-m3/references/material3/PagerScaffoldSample.kt.md +204 -0
- package/skills/android-wear-compose-m3/references/material3/PagerScaffoldSample.kt.md.txt +204 -0
- package/skills/android-wear-compose-m3/references/material3/PickerGroupSample.kt.md +139 -0
- package/skills/android-wear-compose-m3/references/material3/PickerGroupSample.kt.md.txt +139 -0
- package/skills/android-wear-compose-m3/references/material3/PickerSample.kt.md +111 -0
- package/skills/android-wear-compose-m3/references/material3/PickerSample.kt.md.txt +111 -0
- package/skills/android-wear-compose-m3/references/material3/PlaceholderSample.kt.md +184 -0
- package/skills/android-wear-compose-m3/references/material3/PlaceholderSample.kt.md.txt +184 -0
- package/skills/android-wear-compose-m3/references/material3/ProgressIndicatorSample.kt.md +263 -0
- package/skills/android-wear-compose-m3/references/material3/ProgressIndicatorSample.kt.md.txt +263 -0
- package/skills/android-wear-compose-m3/references/material3/RadioButtonSample.kt.md +105 -0
- package/skills/android-wear-compose-m3/references/material3/RadioButtonSample.kt.md.txt +105 -0
- package/skills/android-wear-compose-m3/references/material3/ScaffoldSample.kt.md +146 -0
- package/skills/android-wear-compose-m3/references/material3/ScaffoldSample.kt.md.txt +146 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollAwaySample.kt.md +97 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollAwaySample.kt.md.txt +97 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollIndicatorSample.kt.md +66 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollIndicatorSample.kt.md.txt +66 -0
- package/skills/android-wear-compose-m3/references/material3/SliderSample.kt.md +86 -0
- package/skills/android-wear-compose-m3/references/material3/SliderSample.kt.md.txt +86 -0
- package/skills/android-wear-compose-m3/references/material3/StepperSample.kt.md +148 -0
- package/skills/android-wear-compose-m3/references/material3/StepperSample.kt.md.txt +148 -0
- package/skills/android-wear-compose-m3/references/material3/SurfaceTransformationSample.kt.md +166 -0
- package/skills/android-wear-compose-m3/references/material3/SurfaceTransformationSample.kt.md.txt +166 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToDismissBoxSample.kt.md +172 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToDismissBoxSample.kt.md.txt +172 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToRevealSample.kt.md +367 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToRevealSample.kt.md.txt +367 -0
- package/skills/android-wear-compose-m3/references/material3/SwitchButtonSample.kt.md +66 -0
- package/skills/android-wear-compose-m3/references/material3/SwitchButtonSample.kt.md.txt +66 -0
- package/skills/android-wear-compose-m3/references/material3/TextButtonSample.kt.md +115 -0
- package/skills/android-wear-compose-m3/references/material3/TextButtonSample.kt.md.txt +115 -0
- package/skills/android-wear-compose-m3/references/material3/TextToggleButtonSample.kt.md +71 -0
- package/skills/android-wear-compose-m3/references/material3/TextToggleButtonSample.kt.md.txt +71 -0
- package/skills/android-wear-compose-m3/references/material3/TimePickerSample.kt.md +151 -0
- package/skills/android-wear-compose-m3/references/material3/TimePickerSample.kt.md.txt +151 -0
- package/skills/android-wear-compose-m3/references/material3/TimeTextSample.kt.md +65 -0
- package/skills/android-wear-compose-m3/references/material3/TimeTextSample.kt.md.txt +65 -0
- package/skills/android-wear-compose-m3/references/material3/TransformationSpecSample.kt.md +246 -0
- package/skills/android-wear-compose-m3/references/material3/TransformationSpecSample.kt.md.txt +246 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnNotificationsSample.kt.md +89 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnNotificationsSample.kt.md.txt +89 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnSample.kt.md +309 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnSample.kt.md.txt +309 -0
- package/skills/android-wear-compose-m3/references/navigation3/SwipeDismissableSceneStrategySample.kt.md +205 -0
- package/skills/android-wear-compose-m3/references/navigation3/SwipeDismissableSceneStrategySample.kt.md.txt +205 -0
- package/skills/{architecture-feature-first → flutter-architecture-feature-first}/SKILL.md +1 -1
- package/skills/{bloc → flutter-bloc}/SKILL.md +1 -1
- package/skills/flutter-build-debug/SKILL.md +66 -0
- package/skills/{code-review → flutter-code-review}/SKILL.md +1 -1
- package/skills/{dart-3-updates → flutter-dart-3-updates}/SKILL.md +1 -1
- package/skills/{dart-fix-runtime-errors → flutter-dart-fix-runtime-errors}/SKILL.md +1 -1
- package/skills/{dart-resolve-package-conflicts → flutter-dart-resolve-package-conflicts}/SKILL.md +1 -1
- package/skills/{dart-run-static-analysis → flutter-dart-run-static-analysis}/SKILL.md +1 -1
- package/skills/{dart-use-pattern-matching → flutter-dart-use-pattern-matching}/SKILL.md +1 -1
- package/skills/{effective-dart → flutter-effective-dart}/SKILL.md +1 -1
- package/skills/{provider → flutter-provider}/SKILL.md +1 -1
- package/skills/{riverpod → flutter-riverpod}/SKILL.md +1 -1
- package/skills/ios-cocoapods-debug/SKILL.md +65 -0
- package/skills/ios-code-review/SKILL.md +56 -0
- package/skills/ios-xcode-build-debug/SKILL.md +66 -0
- package/skills/{detect-mobile-stack → mobile-detect-stack}/SKILL.md +1 -1
- package/skills/mobile-firebase/SKILL.md +54 -0
- package/skills/mobile-firebase/references/android/ai-logic.md +31 -0
- package/skills/mobile-firebase/references/android/analytics.md +33 -0
- package/skills/mobile-firebase/references/android/app-check.md +36 -0
- package/skills/mobile-firebase/references/android/auth.md +44 -0
- package/skills/mobile-firebase/references/android/crashlytics.md +31 -0
- package/skills/mobile-firebase/references/android/firestore.md +44 -0
- package/skills/mobile-firebase/references/android/functions.md +33 -0
- package/skills/mobile-firebase/references/android/in-app-messaging.md +28 -0
- package/skills/mobile-firebase/references/android/messaging.md +41 -0
- package/skills/mobile-firebase/references/android/realtime-database.md +50 -0
- package/skills/mobile-firebase/references/android/remote-config.md +43 -0
- package/skills/mobile-firebase/references/android/sql-connect.md +31 -0
- package/skills/mobile-firebase/references/android/storage.md +39 -0
- package/skills/mobile-firebase/references/android.md +30 -0
- package/skills/{firebase-ai/SKILL.md → mobile-firebase/references/flutter/ai-logic.md} +2 -8
- package/skills/{firebase-analytics/SKILL.md → mobile-firebase/references/flutter/analytics.md} +2 -8
- package/skills/{firebase-app-check/SKILL.md → mobile-firebase/references/flutter/app-check.md} +2 -8
- package/skills/{firebase-auth/SKILL.md → mobile-firebase/references/flutter/auth.md} +2 -8
- package/skills/{firebase-crashlytics/SKILL.md → mobile-firebase/references/flutter/crashlytics.md} +2 -8
- package/skills/{firebase-cloud-firestore/SKILL.md → mobile-firebase/references/flutter/firestore.md} +2 -8
- package/skills/{firebase-cloud-functions/SKILL.md → mobile-firebase/references/flutter/functions.md} +2 -8
- package/skills/{firebase-in-app-messaging/SKILL.md → mobile-firebase/references/flutter/in-app-messaging.md} +2 -8
- package/skills/{firebase-messaging/SKILL.md → mobile-firebase/references/flutter/messaging.md} +2 -8
- package/skills/{firebase-database/SKILL.md → mobile-firebase/references/flutter/realtime-database.md} +2 -8
- package/skills/{firebase-remote-config/SKILL.md → mobile-firebase/references/flutter/remote-config.md} +2 -8
- package/skills/{flutterfire-configure/SKILL.md → mobile-firebase/references/flutter/setup-flutterfire.md} +1 -8
- package/skills/{firebase-data-connect/SKILL.md → mobile-firebase/references/flutter/sql-connect.md} +2 -8
- package/skills/{firebase-storage/SKILL.md → mobile-firebase/references/flutter/storage.md} +2 -8
- package/skills/mobile-firebase/references/flutter.md +36 -0
- package/skills/mobile-firebase/references/ios/ai-logic.md +30 -0
- package/skills/mobile-firebase/references/ios/analytics.md +33 -0
- package/skills/mobile-firebase/references/ios/app-check.md +36 -0
- package/skills/mobile-firebase/references/ios/auth.md +48 -0
- package/skills/mobile-firebase/references/ios/crashlytics.md +34 -0
- package/skills/mobile-firebase/references/ios/firestore.md +53 -0
- package/skills/mobile-firebase/references/ios/functions.md +35 -0
- package/skills/mobile-firebase/references/ios/in-app-messaging.md +26 -0
- package/skills/mobile-firebase/references/ios/messaging.md +45 -0
- package/skills/mobile-firebase/references/ios/realtime-database.md +49 -0
- package/skills/mobile-firebase/references/ios/remote-config.md +44 -0
- package/skills/mobile-firebase/references/ios/sql-connect.md +33 -0
- package/skills/mobile-firebase/references/ios/storage.md +36 -0
- package/skills/mobile-firebase/references/ios.md +28 -0
- package/skills/mobile-firebase/references/react-native/ai-logic.md +32 -0
- package/skills/mobile-firebase/references/react-native/analytics.md +43 -0
- package/skills/mobile-firebase/references/react-native/app-check.md +35 -0
- package/skills/mobile-firebase/references/react-native/auth.md +50 -0
- package/skills/mobile-firebase/references/react-native/crashlytics.md +36 -0
- package/skills/mobile-firebase/references/react-native/firestore.md +45 -0
- package/skills/mobile-firebase/references/react-native/functions.md +28 -0
- package/skills/mobile-firebase/references/react-native/in-app-messaging.md +27 -0
- package/skills/mobile-firebase/references/react-native/messaging.md +46 -0
- package/skills/mobile-firebase/references/react-native/realtime-database.md +46 -0
- package/skills/mobile-firebase/references/react-native/remote-config.md +32 -0
- package/skills/mobile-firebase/references/react-native/sql-connect.md +11 -0
- package/skills/mobile-firebase/references/react-native/storage.md +30 -0
- package/skills/mobile-firebase/references/react-native.md +29 -0
- package/skills/mobile-test/SKILL.md +63 -0
- package/skills/mobile-test/references/android/setup/GUIDE.md +183 -0
- package/skills/mobile-test/references/android/setup/references/android/develop/ui/compose/testing/common-patterns.md +181 -0
- package/skills/mobile-test/references/android/setup/references/android/studio/preview/compose-screenshot-testing.md +255 -0
- package/skills/mobile-test/references/android/setup/references/android/training/dependency-injection/hilt-testing.md +447 -0
- package/skills/mobile-test/references/android.md +83 -0
- package/skills/{dart-collect-coverage/SKILL.md → mobile-test/references/flutter/coverage.md} +2 -11
- package/skills/{dart-generate-test-mocks/SKILL.md → mobile-test/references/flutter/generate-mocks.md} +2 -11
- package/skills/{flutter-add-integration-test/SKILL.md → mobile-test/references/flutter/integration-tests.md} +2 -11
- package/skills/{dart-migrate-to-checks-package/SKILL.md → mobile-test/references/flutter/migrate-to-checks.md} +2 -13
- package/skills/{mockito/SKILL.md → mobile-test/references/flutter/mockito.md} +1 -8
- package/skills/{mocktail/SKILL.md → mobile-test/references/flutter/mocktail.md} +1 -8
- package/skills/{patrol-e2e-testing/SKILL.md → mobile-test/references/flutter/patrol.md} +1 -8
- package/skills/{testing/SKILL.md → mobile-test/references/flutter/testing-guidelines.md} +1 -8
- package/skills/{dart-add-unit-test/SKILL.md → mobile-test/references/flutter/unit-tests.md} +2 -11
- package/skills/{flutter-add-widget-test/SKILL.md → mobile-test/references/flutter/widget-tests.md} +2 -11
- package/skills/mobile-test/references/flutter.md +44 -0
- package/skills/mobile-test/references/ios.md +79 -0
- package/skills/mobile-test/references/react-native.md +62 -0
- /package/skills/{dart-use-pattern-matching → flutter-dart-use-pattern-matching}/examples/json_patterns.dart +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: android-r8-analyzer
|
|
3
|
+
description: Analyzes Android build files and R8 keep rules to identify redundancies,
|
|
4
|
+
broad package-wide rules, and rules that subsume library consumer keep rules. Use
|
|
5
|
+
when developers want to optimize their app's size, remove redundant or overly broad
|
|
6
|
+
keep rules, or troubleshoot Proguard configurations.
|
|
7
|
+
license: Apache-2.0
|
|
8
|
+
source: https://github.com/android/skills
|
|
9
|
+
intents: [performance, build]
|
|
10
|
+
stacks: [android]
|
|
11
|
+
metadata:
|
|
12
|
+
author: Google LLC
|
|
13
|
+
last-updated: '2026-08-28'
|
|
14
|
+
keywords:
|
|
15
|
+
- R8
|
|
16
|
+
- proguard
|
|
17
|
+
- keep rules
|
|
18
|
+
- app size
|
|
19
|
+
- optimization
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Step 1. Setup and configuration check
|
|
23
|
+
|
|
24
|
+
- Inspect `build.gradle`, `build.gradle.kts`, and `gradle.properties`.
|
|
25
|
+
- Use [references/CONFIGURATION.md](references/CONFIGURATION.md) to identify missing optimizations.
|
|
26
|
+
- **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).
|
|
27
|
+
- **Full Mode** : Verify `android.enableR8.fullMode=false` is removed from gradle.properties.
|
|
28
|
+
|
|
29
|
+
## Step 2. Analysis path selection
|
|
30
|
+
|
|
31
|
+
- Inspect `build.gradle`, `build.gradle.kts`, and `gradle.properties` and
|
|
32
|
+
`libs.versions.toml` to get the AGP and R8 versions.
|
|
33
|
+
|
|
34
|
+
- **If AGP \>= 9.3.0** : Proceed to **Path A (Standalone Task)**.
|
|
35
|
+
|
|
36
|
+
- **If AGP \< 9.3.0 and R8 \>= 9.3.7-dev** : Proceed to **Path B (Quantitative)**.
|
|
37
|
+
|
|
38
|
+
- If none of the conditions are met, proceed to **Path C (Heuristic)**.
|
|
39
|
+
|
|
40
|
+
### Path A: Standalone Gradle task (AGP \>= 9.3.0)
|
|
41
|
+
|
|
42
|
+
- **Step 1: Run standalone task** : Run `./gradlew :app:analyzeReleaseR8Config` to evaluate the R8 configuration. You MUST wait for this command to finish before proceeding.
|
|
43
|
+
- **Step 2: Convert to JSON** : The report is generated at `app/build/reports/r8/r8-config-analyzer-release.pb`. You MUST explicitly run the conversion script by executing: `python3 .agents/skills/r8-analyzer/scripts/convert_pb_to_json.py`. Wait for this command to finish.
|
|
44
|
+
- **Step 3: Analyze** : You MUST explicitly run the analysis script by executing: `python3 .agents/skills/r8-analyzer/scripts/analyze.py`. This outputs `tmp/keepradius/analysis_result.txt`. Wait for this command to finish.
|
|
45
|
+
|
|
46
|
+
### Path B: Quantitative data generation (R8 \>= 9.3.7-dev and AGP \< 9.3.0)
|
|
47
|
+
|
|
48
|
+
- **Step 1: Check requirements** : Python and `protobuf` package are mandatory.
|
|
49
|
+
- **Step 2: Generate and analyze** : You MUST run the shell commands described in [references/CONFIGURATION-ANALYZER.md](references/CONFIGURATION-ANALYZER.md) to generate the proto file using R8 configuration analyzer, convert it to JSON and analyze the result.
|
|
50
|
+
- **Step 3: Analyze** : You MUST ensure the analysis produces `tmp/keepradius/analysis_result.txt` for scores and rule impact metrics.
|
|
51
|
+
|
|
52
|
+
### Path C: Heuristic evaluation and recommendation (R8 \< 9.3.7-dev)
|
|
53
|
+
|
|
54
|
+
*(Use ONLY if quantitative data generation is not possible)*
|
|
55
|
+
|
|
56
|
+
- **Step 1: Manual evaluation** : Inspect `proguard-rules.pro`.
|
|
57
|
+
- **Step 2: Library check** : Compare rules against [references/REDUNDANT-RULES.md](references/REDUNDANT-RULES.md). Suggest **Remove** for bundled rules.
|
|
58
|
+
- **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).
|
|
59
|
+
- **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.
|
|
60
|
+
|
|
61
|
+
## Step 3. Report generation
|
|
62
|
+
|
|
63
|
+
- **Format** : Follow [references/REPORT_FORMAT.md](references/REPORT_FORMAT.md) strictly.
|
|
64
|
+
- **Input**: Extract metrics (Scores, Impacts, Example Classes) directly from generated file analysis.txt if using Path A, or from manual findings if using Path B.
|
|
65
|
+
- **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
|
|
66
|
+
|
|
67
|
+
## Constraints
|
|
68
|
+
|
|
69
|
+
- **Strict output limit**: The final output MUST strictly be the Markdown report and nothing else.
|
|
70
|
+
- **No code changes**: Research and suggest only; Do not modify files.
|
|
71
|
+
- **No redundancy**: Do not explain R8 benefits or reference skill internal files in the report.
|
|
72
|
+
- **Focus**: Omit sections (for example, Subsumed Rules, Configuration) if no issues or items are found.
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
On each step, keep the user informed of the progress by displaying the output.
|
|
2
|
+
|
|
3
|
+
### 1. Requirements
|
|
4
|
+
|
|
5
|
+
- R8 Version: 9.3.7-dev or later
|
|
6
|
+
|
|
7
|
+
### 2. Generate proto
|
|
8
|
+
|
|
9
|
+
The report and files must be generated at `{project_root}/tmp/r8analysis`. If
|
|
10
|
+
the folder is not present, create it. For example:
|
|
11
|
+
|
|
12
|
+
mkdir -p "$PWD/tmp/r8analysis"
|
|
13
|
+
|
|
14
|
+
### 3. Remove existing files
|
|
15
|
+
|
|
16
|
+
To make sure that this invocation doesn't source data from previous runs, remove
|
|
17
|
+
the intermediate files `keepruleradius.json` and `analysis_result.txt` and
|
|
18
|
+
remove the proto files in the `{project_root}/tmp/r8analysis` folder. Example
|
|
19
|
+
bash commands:
|
|
20
|
+
|
|
21
|
+
# Remove the intermediate JSON and the directory containing protobuf files
|
|
22
|
+
rm tmp/r8analysis/keepruleradius.json
|
|
23
|
+
rm tmp/r8analysis/*.pb
|
|
24
|
+
|
|
25
|
+
# Copy the previous result to history before deleting the analysis
|
|
26
|
+
if [ -f tmp/r8analysis/analysis_result.txt ];
|
|
27
|
+
then cat tmp/r8analysis/analysis_result.txt > tmp/r8analysis/history.txt &&
|
|
28
|
+
rm tmp/r8analysis/analysis_result.txt; fi
|
|
29
|
+
|
|
30
|
+
### 4. Generate the Configuration Analyzer report
|
|
31
|
+
|
|
32
|
+
Run the R8 enabled build with the system property
|
|
33
|
+
"-Dcom.android.tools.r8.dumpkeepradiustodirectory=$PWD/tmp/r8analysis" to
|
|
34
|
+
generate Configuration Analyzer report
|
|
35
|
+
|
|
36
|
+
./gradlew assembleRelease \
|
|
37
|
+
-Dcom.android.tools.r8.dumpkeepradiustodirectory=$PWD/tmp/r8analysis
|
|
38
|
+
|
|
39
|
+
### 5. Convert to JSON
|
|
40
|
+
|
|
41
|
+
To convert the generated protobuf files in `{project_root}/tmp/r8analysis` into
|
|
42
|
+
json, run the following script. The json must be generated in
|
|
43
|
+
`{project_root}/tmp/r8analysis`. Ensure `keep_radius_pb2.py` (from Step 10) is
|
|
44
|
+
in the same directory.
|
|
45
|
+
|
|
46
|
+
import sys
|
|
47
|
+
import os
|
|
48
|
+
import glob
|
|
49
|
+
from google.protobuf import json_format
|
|
50
|
+
import keep_radius_pb2
|
|
51
|
+
|
|
52
|
+
def convert_pb_to_json(input_pb_path, output_json_path):
|
|
53
|
+
bundle = keep_radius_pb2.BlastRadiusContainer()
|
|
54
|
+
|
|
55
|
+
try:
|
|
56
|
+
with open(input_pb_path, "rb") as pb_file:
|
|
57
|
+
binary_data = pb_file.read()
|
|
58
|
+
except Exception as e:
|
|
59
|
+
print(f"Error reading file {input_pb_path}: {e}", file=sys.stderr)
|
|
60
|
+
return False
|
|
61
|
+
|
|
62
|
+
try:
|
|
63
|
+
bundle.ParseFromString(binary_data)
|
|
64
|
+
except Exception as e:
|
|
65
|
+
print(f"Error parsing protobuf: {e}", file=sys.stderr)
|
|
66
|
+
return False
|
|
67
|
+
|
|
68
|
+
try:
|
|
69
|
+
json_string = json_format.MessageToJson(
|
|
70
|
+
bundle,
|
|
71
|
+
always_print_fields_with_no_presence=True,
|
|
72
|
+
preserving_proto_field_name=True,
|
|
73
|
+
indent=4
|
|
74
|
+
)
|
|
75
|
+
with open(output_json_path, "w", encoding="utf-8") as json_file:
|
|
76
|
+
json_file.write(json_string)
|
|
77
|
+
return True
|
|
78
|
+
except Exception as e:
|
|
79
|
+
print(f"Error writing JSON: {e}", file=sys.stderr)
|
|
80
|
+
return False
|
|
81
|
+
|
|
82
|
+
if __name__ == "__main__":
|
|
83
|
+
input_pb = sys.argv[1] if len(sys.argv) > 1 else None
|
|
84
|
+
if not input_pb:
|
|
85
|
+
pb_files = glob.glob("tmp/r8analysis/*.pb")
|
|
86
|
+
if not pb_files:
|
|
87
|
+
print("Error: No .pb file found in tmp/r8analysis", file=sys.stderr)
|
|
88
|
+
sys.exit(1)
|
|
89
|
+
input_pb = sorted(pb_files)[-1] # Use the most recent one
|
|
90
|
+
output_json = sys.argv[2] if len(sys.argv) > 2 else "tmp/r8analysis/keepruleradius.json"
|
|
91
|
+
if not convert_pb_to_json(input_pb, output_json):
|
|
92
|
+
sys.exit(1)
|
|
93
|
+
|
|
94
|
+
### 6. Analyze
|
|
95
|
+
|
|
96
|
+
Run the following analysis script on the generated JSON to get the impact of the
|
|
97
|
+
keep rules and sort it.
|
|
98
|
+
|
|
99
|
+
import json, sys
|
|
100
|
+
|
|
101
|
+
def analyze(path):
|
|
102
|
+
try:
|
|
103
|
+
with open(path, 'r') as f:
|
|
104
|
+
d = json.load(f)
|
|
105
|
+
except Exception as e:
|
|
106
|
+
print(f"Error loading JSON: {e}")
|
|
107
|
+
return
|
|
108
|
+
|
|
109
|
+
# Build reference map
|
|
110
|
+
c_map = {c.get('id'): set(c.get('constraints', [])) for c in d.get('keep_constraints_table', [])}
|
|
111
|
+
r_map = {r.get('id'): c_map.get(r.get('constraints_id'), set()) for r in d.get('keep_rule_blast_radius_table', [])}
|
|
112
|
+
|
|
113
|
+
tot_opt = tot_obf = tot_shr = tot_items = 0
|
|
114
|
+
|
|
115
|
+
# Tally constraints across all kept items
|
|
116
|
+
for tbl in ('kept_class_info_table', 'kept_field_info_table', 'kept_method_info_table'):
|
|
117
|
+
for i in d.get(tbl, []):
|
|
118
|
+
tot_items += 1
|
|
119
|
+
kb = i.get('kept_by', [])
|
|
120
|
+
if any('DONT_OPTIMIZE' in r_map.get(r, set()) for r in kb): tot_opt += 1
|
|
121
|
+
if any('DONT_OBFUSCATE' in r_map.get(r, set()) for r in kb): tot_obf += 1
|
|
122
|
+
if any('DONT_SHRINK' in r_map.get(r, set()) for r in kb): tot_shr += 1
|
|
123
|
+
|
|
124
|
+
# Find denominator
|
|
125
|
+
bi = d.get('build_info', {})
|
|
126
|
+
live = sum(int(bi.get(k, 0)) for k in ('live_class_count', 'live_field_count', 'live_method_count'))
|
|
127
|
+
denom = live if live > 0 else tot_items
|
|
128
|
+
|
|
129
|
+
# Check for globals
|
|
130
|
+
globals_src = [g.get('source', '').lower() for g in d.get('global_keep_rule_blast_radius_table', [])]
|
|
131
|
+
def score(cnt, flag):
|
|
132
|
+
if any(flag in src for src in globals_src): return 0.0
|
|
133
|
+
return max(0.0, 100.0 - ((cnt / denom * 100) if denom > 0 else 0))
|
|
134
|
+
|
|
135
|
+
result = [
|
|
136
|
+
f"Optimization Score: {score(tot_opt, '-dontoptimize'):.2f}%",
|
|
137
|
+
f"Obfuscation Score: {score(tot_obf, '-dontobfuscate'):.2f}%",
|
|
138
|
+
f"Shrinking Score: {score(tot_shr, '-dontshrink'):.2f}%"
|
|
139
|
+
]
|
|
140
|
+
for line in result:
|
|
141
|
+
print(line)
|
|
142
|
+
with open("tmp/r8analysis/analysis_result.txt", "w") as f:
|
|
143
|
+
f.write("\n".join(result))
|
|
144
|
+
|
|
145
|
+
if __name__ == "__main__":
|
|
146
|
+
path = sys.argv[1] if len(sys.argv) > 1 else "tmp/r8analysis/keepruleradius.json"
|
|
147
|
+
analyze(path)
|
|
148
|
+
|
|
149
|
+
Outputs `analysis_result.txt` containing scores and rule impacts.
|
|
150
|
+
|
|
151
|
+
### 7. Report impactful rules
|
|
152
|
+
|
|
153
|
+
Identify the keep rules with the highest impact and the subsumed rules using the
|
|
154
|
+
following script.
|
|
155
|
+
|
|
156
|
+
import json, sys
|
|
157
|
+
|
|
158
|
+
def report(path):
|
|
159
|
+
try:
|
|
160
|
+
with open(path, 'r') as f:
|
|
161
|
+
data = json.load(f)
|
|
162
|
+
except Exception as e:
|
|
163
|
+
print(f"Error loading JSON: {e}")
|
|
164
|
+
return
|
|
165
|
+
|
|
166
|
+
# Calculate denominator for percentage
|
|
167
|
+
bi = data.get('build_info', {})
|
|
168
|
+
live = sum(int(bi.get(k, 0)) for k in ('live_class_count', 'live_field_count', 'live_method_count'))
|
|
169
|
+
denom = live if live > 0 else sum(len(data.get(tbl, [])) for tbl in ('kept_class_info_table', 'kept_field_info_table', 'kept_method_info_table'))
|
|
170
|
+
|
|
171
|
+
processed = []
|
|
172
|
+
for r in data.get('keep_rule_blast_radius_table', []):
|
|
173
|
+
br = r.get('blast_radius', {})
|
|
174
|
+
c, f, m = len(br.get('class_blast_radius', [])), len(br.get('field_blast_radius', [])), len(br.get('method_blast_radius', []))
|
|
175
|
+
impact = c + f + m
|
|
176
|
+
if impact == 0:
|
|
177
|
+
continue
|
|
178
|
+
impact_pct = (impact / denom * 100) if denom > 0 else 0.0
|
|
179
|
+
processed.append({
|
|
180
|
+
'id': r.get('id'),
|
|
181
|
+
'source': r.get('source'),
|
|
182
|
+
'impact': impact,
|
|
183
|
+
'impact_pct': f"{impact_pct:.2f}%",
|
|
184
|
+
'classes': c,
|
|
185
|
+
'fields': f,
|
|
186
|
+
'methods': m,
|
|
187
|
+
'subsumed_by': br.get('subsumed_by', [])
|
|
188
|
+
})
|
|
189
|
+
|
|
190
|
+
processed.sort(key=lambda x: x['impact'], reverse=True)
|
|
191
|
+
|
|
192
|
+
# Output JSON for the agent to fetch and process
|
|
193
|
+
print(json.dumps({
|
|
194
|
+
"top_5_impact_keep_rules": [r for r in processed if not r['subsumed_by']][:5],
|
|
195
|
+
"subsumed": [r for r in processed if r['subsumed_by']]
|
|
196
|
+
}, indent=2))
|
|
197
|
+
|
|
198
|
+
if __name__ == "__main__":
|
|
199
|
+
report("tmp/r8analysis/keepruleradius.json")
|
|
200
|
+
|
|
201
|
+
Add this data to the `analysis_result.txt` with the top impactful rules and
|
|
202
|
+
subsumed rules.
|
|
203
|
+
|
|
204
|
+
### 8. Compare with previous report
|
|
205
|
+
|
|
206
|
+
If `{project_root}/tmp/r8analysis/history.txt` exists, use the following script
|
|
207
|
+
to compare the previous run. Use this to compare with the current values
|
|
208
|
+
|
|
209
|
+
### 9. Remove generated files
|
|
210
|
+
|
|
211
|
+
After the final report and analysis results are generated, remove the
|
|
212
|
+
intermediate files `keepruleradius.json` and `analysis_result.txt` and remove
|
|
213
|
+
the proto files in "{project_root}/tmp/r8analysis" folder
|
|
214
|
+
|
|
215
|
+
rm tmp/r8analysis/keepruleradius.json
|
|
216
|
+
rm tmp/r8analysis/*.pb
|
|
217
|
+
|
|
218
|
+
### 10. Protobuf Python bindings
|
|
219
|
+
|
|
220
|
+
The following script `keep_radius_pb2.py` is required by the conversion script
|
|
221
|
+
in Step 5.
|
|
222
|
+
|
|
223
|
+
from google.protobuf import descriptor as _descriptor
|
|
224
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
225
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
226
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
227
|
+
from google.protobuf.internal import builder as _builder
|
|
228
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
229
|
+
_runtime_version.Domain.PUBLIC,
|
|
230
|
+
6,
|
|
231
|
+
33,
|
|
232
|
+
4,
|
|
233
|
+
'',
|
|
234
|
+
'keep_radius.proto'
|
|
235
|
+
)
|
|
236
|
+
# @@protoc_insertion_point(imports)
|
|
237
|
+
|
|
238
|
+
_sym_db = _symbol_database.Default()
|
|
239
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11keep_radius.proto\x12&com.android.tools.r8.blastradius.proto\"\x9f\x02\n\x13KeepRuleBlastRadius\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0e\n\x06source\x18\x02 \x01(\t\x12\x16\n\x0e\x63onstraints_id\x18\x03 \x01(\x05\x12\x46\n\x06origin\x18\x04 \x01(\x0b\x32\x36.com.android.tools.r8.blastradius.proto.TextFileOrigin\x12I\n\x0c\x62last_radius\x18\x05 \x01(\x0b\x32\x33.com.android.tools.r8.blastradius.proto.BlastRadius\x12\x41\n\x04tags\x18\x06 \x03(\x0e\x32\x33.com.android.tools.r8.blastradius.proto.KeepRuleTag\"w\n\x0b\x42lastRadius\x12\x13\n\x0bsubsumed_by\x18\x01 \x03(\x05\x12\x1a\n\x12\x63lass_blast_radius\x18\x02 \x03(\x05\x12\x1a\n\x12\x66ield_blast_radius\x18\x03 \x03(\x05\x12\x1b\n\x13method_blast_radius\x18\x04 \x03(\x05\"\x7f\n\x19GlobalKeepRuleBlastRadius\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0e\n\x06source\x18\x02 \x01(\t\x12\x46\n\x06origin\x18\x03 \x01(\x0b\x32\x36.com.android.tools.r8.blastradius.proto.TextFileOrigin\"j\n\x0fKeepConstraints\x12\n\n\x02id\x18\x01 \x01(\x05\x12K\n\x0b\x63onstraints\x18\x02 \x03(\x0e\x32\x36.com.android.tools.r8.blastradius.proto.KeepConstraint\"`\n\rKeptClassInfo\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x1a\n\x12\x63lass_reference_id\x18\x02 \x01(\x05\x12\x16\n\x0e\x66ile_origin_id\x18\x03 \x01(\x05\x12\x0f\n\x07kept_by\x18\x04 \x03(\x05\"`\n\rKeptFieldInfo\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x1a\n\x12\x66ield_reference_id\x18\x02 \x01(\x05\x12\x16\n\x0e\x66ile_origin_id\x18\x03 \x01(\x05\x12\x0f\n\x07kept_by\x18\x04 \x03(\x05\"b\n\x0eKeptMethodInfo\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x1b\n\x13method_reference_id\x18\x02 \x01(\x05\x12\x16\n\x0e\x66ile_origin_id\x18\x03 \x01(\x05\x12\x0f\n\x07kept_by\x18\x04 \x03(\x05\"a\n\x0e\x46ieldReference\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x1a\n\x12\x63lass_reference_id\x18\x02 \x01(\x05\x12\x19\n\x11type_reference_id\x18\x03 \x01(\x05\x12\x0c\n\x04name\x18\x04 \x01(\t\"c\n\x0fMethodReference\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x1a\n\x12\x63lass_reference_id\x18\x02 \x01(\x05\x12\x1a\n\x12proto_reference_id\x18\x03 \x01(\x05\x12\x0c\n\x04name\x18\x04 \x01(\t\"K\n\x0eProtoReference\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x15\n\rparameters_id\x18\x02 \x01(\x05\x12\x16\n\x0ereturn_type_id\x18\x03 \x01(\x05\"4\n\rTypeReference\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x17\n\x0fjava_descriptor\x18\x02 \x01(\t\";\n\x11TypeReferenceList\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x1a\n\x12type_reference_ids\x18\x02 \x03(\x05\"\x9f\x01\n\nFileOrigin\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x10\n\x08\x66ilename\x18\x02 \x01(\t\x12Q\n\x10maven_coordinate\x18\x03 \x01(\x0b\x32\x37.com.android.tools.r8.blastradius.proto.MavenCoordinate\x12 \n\x18provided_by_build_system\x18\x04 \x01(\x08\"I\n\x14\x43lassFileInJarOrigin\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x16\n\x0e\x66ile_origin_id\x18\x02 \x01(\x05\x12\r\n\x05\x65ntry\x18\x03 \x01(\t\"T\n\x0eTextFileOrigin\x12\x16\n\x0e\x66ile_origin_id\x18\x01 \x01(\x05\x12\x13\n\x0bline_number\x18\x02 \x01(\x05\x12\x15\n\rcolumn_number\x18\x03 \x01(\x05\"U\n\x0fMavenCoordinate\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x10\n\x08group_id\x18\x02 \x01(\t\x12\x13\n\x0b\x61rtifact_id\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\"\x9a\x01\n\tBuildInfo\x12\x13\n\x0b\x63lass_count\x18\x01 \x01(\x05\x12\x13\n\x0b\x66ield_count\x18\x02 \x01(\x05\x12\x14\n\x0cmethod_count\x18\x03 \x01(\x05\x12\x18\n\x10live_class_count\x18\x04 \x01(\x05\x12\x18\n\x10live_field_count\x18\x05 \x01(\x05\x12\x19\n\x11live_method_count\x18\x06 \x01(\x05\"\xd5\n\n\x14\x42lastRadiusContainer\x12M\n\x11\x66ile_origin_table\x18\x01 \x03(\x0b\x32\x32.com.android.tools.r8.blastradius.proto.FileOrigin\x12\x64\n\x1e\x63lass_file_in_jar_origin_table\x18\x02 \x03(\x0b\x32<.com.android.tools.r8.blastradius.proto.ClassFileInJarOrigin\x12W\n\x16maven_coordinate_table\x18\x03 \x03(\x0b\x32\x37.com.android.tools.r8.blastradius.proto.MavenCoordinate\x12U\n\x15\x66ield_reference_table\x18\x04 \x03(\x0b\x32\x36.com.android.tools.r8.blastradius.proto.FieldReference\x12W\n\x16method_reference_table\x18\x05 \x03(\x0b\x32\x37.com.android.tools.r8.blastradius.proto.MethodReference\x12U\n\x15proto_reference_table\x18\x06 \x03(\x0b\x32\x36.com.android.tools.r8.blastradius.proto.ProtoReference\x12S\n\x14type_reference_table\x18\x07 \x03(\x0b\x32\x35.com.android.tools.r8.blastradius.proto.TypeReference\x12\\\n\x19type_reference_list_table\x18\x08 \x03(\x0b\x32\x39.com.android.tools.r8.blastradius.proto.TypeReferenceList\x12T\n\x15kept_class_info_table\x18\t \x03(\x0b\x32\x35.com.android.tools.r8.blastradius.proto.KeptClassInfo\x12T\n\x15kept_field_info_table\x18\n \x03(\x0b\x32\x35.com.android.tools.r8.blastradius.proto.KeptFieldInfo\x12V\n\x16kept_method_info_table\x18\x0b \x03(\x0b\x32\x36.com.android.tools.r8.blastradius.proto.KeptMethodInfo\x12W\n\x16keep_constraints_table\x18\x0c \x03(\x0b\x32\x37.com.android.tools.r8.blastradius.proto.KeepConstraints\x12\x61\n\x1ckeep_rule_blast_radius_table\x18\r \x03(\x0b\x32;.com.android.tools.r8.blastradius.proto.KeepRuleBlastRadius\x12n\n#global_keep_rule_blast_radius_table\x18\x0e \x03(\x0b\x32\x41.com.android.tools.r8.blastradius.proto.GlobalKeepRuleBlastRadius\x12\x45\n\nbuild_info\x18\x0f \x01(\x0b\x32\x31.com.android.tools.r8.blastradius.proto.BuildInfo*\x1f\n\x0bKeepRuleTag\x12\x10\n\x0cPACKAGE_WIDE\x10\x00*H\n\x0eKeepConstraint\x12\x12\n\x0e\x44ONT_OBFUSCATE\x10\x00\x12\x11\n\rDONT_OPTIMIZE\x10\x01\x12\x0f\n\x0b\x44ONT_SHRINK\x10\x02\x42\x45\n&com.android.tools.r8.blastradius.protoB\x19KeepRuleBlastRadiusProtosP\001\x62\x06proto3')
|
|
240
|
+
|
|
241
|
+
_globals = globals()
|
|
242
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
243
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'keep_radius_pb2', _globals)
|
|
244
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
245
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
246
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n&com.android.tools.r8.blastradius.protoB\031KeepRuleBlastRadiusProtosP\001'
|
|
247
|
+
_globals['_KEEPRULETAG']._serialized_start = 3332
|
|
248
|
+
_globals['_KEEPRULETAG']._serialized_end = 3363
|
|
249
|
+
_globals['_KEEPCONSTRAINT']._serialized_start = 3365
|
|
250
|
+
_globals['_KEEPCONSTRAINT']._serialized_end = 3437
|
|
251
|
+
_globals['_KEEPRULEBLASTRADIUS']._serialized_start = 62
|
|
252
|
+
_globals['_KEEPRULEBLASTRADIUS']._serialized_end = 349
|
|
253
|
+
_globals['_BLASTRADIUS']._serialized_start = 351
|
|
254
|
+
_globals['_BLASTRADIUS']._serialized_end = 470
|
|
255
|
+
_globals['_GLOBALKEEPRULEBLASTRADIUS']._serialized_start = 472
|
|
256
|
+
_globals['_GLOBALKEEPRULEBLASTRADIUS']._serialized_end = 599
|
|
257
|
+
_globals['_KEEPCONSTRAINTS']._serialized_start = 601
|
|
258
|
+
_globals['_KEEPCONSTRAINTS']._serialized_end = 707
|
|
259
|
+
_globals['_KEPTCLASSINFO']._serialized_start = 709
|
|
260
|
+
_globals['_KEPTCLASSINFO']._serialized_end = 805
|
|
261
|
+
_globals['_KEPTFIELDINFO']._serialized_start = 807
|
|
262
|
+
_globals['_KEPTFIELDINFO']._serialized_end = 903
|
|
263
|
+
_globals['_KEPTMETHODINFO']._serialized_start = 905
|
|
264
|
+
_globals['_KEPTMETHODINFO']._serialized_end = 1003
|
|
265
|
+
_globals['_FIELDREFERENCE']._serialized_start = 1005
|
|
266
|
+
_globals['_FIELDREFERENCE']._serialized_end = 1102
|
|
267
|
+
_globals['_METHODREFERENCE']._serialized_start = 1104
|
|
268
|
+
_globals['_METHODREFERENCE']._serialized_end = 1203
|
|
269
|
+
_globals['_PROTOREFERENCE']._serialized_start = 1205
|
|
270
|
+
_globals['_PROTOREFERENCE']._serialized_end = 1280
|
|
271
|
+
_globals['_TYPEREFERENCE']._serialized_start = 1282
|
|
272
|
+
_globals['_TYPEREFERENCE']._serialized_end = 1334
|
|
273
|
+
_globals['_TYPEREFERENCELIST']._serialized_start = 1336
|
|
274
|
+
_globals['_TYPEREFERENCELIST']._serialized_end = 1395
|
|
275
|
+
_globals['_FILEORIGIN']._serialized_start = 1398
|
|
276
|
+
_globals['_FILEORIGIN']._serialized_end = 1557
|
|
277
|
+
_globals['_CLASSFILEINJARORIGIN']._serialized_start = 1559
|
|
278
|
+
_globals['_CLASSFILEINJARORIGIN']._serialized_end = 1632
|
|
279
|
+
_globals['_TEXTFILEORIGIN']._serialized_start = 1634
|
|
280
|
+
_globals['_TEXTFILEORIGIN']._serialized_end = 1718
|
|
281
|
+
_globals['_MAVENCOORDINATE']._serialized_start = 1720
|
|
282
|
+
_globals['_MAVENCOORDINATE']._serialized_end = 1805
|
|
283
|
+
_globals['_BUILDINFO']._serialized_start = 1808
|
|
284
|
+
_globals['_BUILDINFO']._serialized_end = 1962
|
|
285
|
+
_globals['_BLASTRADIUSCONTAINER']._serialized_start = 1965
|
|
286
|
+
_globals['_BLASTRADIUSCONTAINER']._serialized_end = 3330
|
|
287
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
To achieve maximum utilization of R8, the codebase must be configured correctly
|
|
2
|
+
depending on the build script language (Kotlin DSL versus Groovy DSL).
|
|
3
|
+
|
|
4
|
+
## 1. App Modules (`com.android.application`)
|
|
5
|
+
|
|
6
|
+
The app's `build.gradle` or `build.gradle.kts` file must enable minification
|
|
7
|
+
and resource shrinking within the `release` build type or the apps custom build
|
|
8
|
+
type for release and performance testing. It MUST use the optimized default file
|
|
9
|
+
(`proguard-android-optimize.txt`).
|
|
10
|
+
|
|
11
|
+
**Kotlin DSL (`build.gradle.kts`):**
|
|
12
|
+
|
|
13
|
+
buildTypes {
|
|
14
|
+
getByName("release") {
|
|
15
|
+
isMinifyEnabled = true
|
|
16
|
+
isShrinkResources = true
|
|
17
|
+
proguardFiles(
|
|
18
|
+
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
19
|
+
"proguard-rules.pro"
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
**Groovy DSL (`build.gradle`):**
|
|
25
|
+
|
|
26
|
+
buildTypes {
|
|
27
|
+
release {
|
|
28
|
+
minifyEnabled = true
|
|
29
|
+
shrinkResources = true
|
|
30
|
+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
## 2. `gradle.properties` Flags
|
|
35
|
+
|
|
36
|
+
**Full Mode:** R8 Full Mode enables the entire optimizations
|
|
37
|
+
|
|
38
|
+
- **AGP 8.0+** : Enabled by default. Ensure `android.enableR8.fullMode=false` is **NOT** present.
|
|
39
|
+
- **Pre-AGP 8.0** : Explicitly enable with `android.enableR8.fullMode=true`.
|
|
40
|
+
|
|
41
|
+
**Optimized Resource Shrinking:** If the AGP version of the project is less than
|
|
42
|
+
9.0 and more than 8.6, explicitly enable the new resource shrinker:
|
|
43
|
+
|
|
44
|
+
android.r8.optimizedResourceShrinking=true
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
Keep rules prevent optimization of R8, these rules are listed in the order of
|
|
2
|
+
the scope of what it retains in the codebase.
|
|
3
|
+
|
|
4
|
+
## 1. Package-Wide Wildcards
|
|
5
|
+
|
|
6
|
+
The following types of keep rules prevents all the optimization of R8 in a
|
|
7
|
+
package, these must be avoided at any costs and must be refined to target a
|
|
8
|
+
specific class or classes.
|
|
9
|
+
|
|
10
|
+
-keep class com.example.package.** { *; } - Prevents optimization of all the classess including members in the package and subpackages
|
|
11
|
+
-keep class com.example.package.* { *; } - Prevents optimization of all the classes including members in the package
|
|
12
|
+
-keep class **.package.** { *; } - Prevents optimization of all the classess including members in all the package containing name - package.
|
|
13
|
+
|
|
14
|
+
Depending on the package level the number of classes gets affected changes, so
|
|
15
|
+
if the package level is higher, more classes are affected. Suggest to refine
|
|
16
|
+
the keep rule
|
|
17
|
+
|
|
18
|
+
## 2. Inversion operator
|
|
19
|
+
|
|
20
|
+
Avoid using the inversion operator ! in keep rules because it will
|
|
21
|
+
unintentionally prevent optimization in every class in your application. So if
|
|
22
|
+
you have any keep rule with !operator, make sure you remove that with a narrow
|
|
23
|
+
and specific keep rule
|
|
24
|
+
|
|
25
|
+
-keep class !com.example.MyClass{*;}
|
|
26
|
+
|
|
27
|
+
This keeps the entire app
|
|
28
|
+
other than this class. Optimization are disabled for the entire class other
|
|
29
|
+
than this class.
|
|
30
|
+
|
|
31
|
+
## 3. Keep Rules for both class and members
|
|
32
|
+
|
|
33
|
+
Keep rules with -keep option and wildcard(`*`) inside braces forces R8 to retain
|
|
34
|
+
specific classes and their members exactly as defined. These type of keep rules
|
|
35
|
+
prevent any optimization in the entire class and keeps the entire class
|
|
36
|
+
|
|
37
|
+
-keep class com.example.MyClass { *; }
|
|
38
|
+
|
|
39
|
+
## 4. Keepclassmembers
|
|
40
|
+
|
|
41
|
+
Keep rules with -keepclassmembers and wildcard(`*`) inside braces option Forces
|
|
42
|
+
R8 to retain the members that are defined.
|
|
43
|
+
|
|
44
|
+
-keepclassmembers class com.example.MyClass { *; }
|
|
45
|
+
|
|
46
|
+
## 5. Modifiers with Keep Specification
|
|
47
|
+
|
|
48
|
+
-Keeps the class and **all** members, but uses modifiers to allow specific
|
|
49
|
+
optimizations (like obfuscation). Retains significant code (members) but allows
|
|
50
|
+
some flexibility.
|
|
51
|
+
|
|
52
|
+
-keep,allowobfuscation class com.example.MyClass { *; }
|
|
53
|
+
-keep,allowshrinking class com.example.MyClass { *; }
|
|
54
|
+
|
|
55
|
+
### 6. Modifiers with specific method but no modifier
|
|
56
|
+
|
|
57
|
+
Keeps the class and modifier but no optimizations are enabled
|
|
58
|
+
|
|
59
|
+
-keep class com.example.MyClass { void myMethod(); }
|
|
60
|
+
|
|
61
|
+
## 7. Class-Name Only Preservation
|
|
62
|
+
|
|
63
|
+
Keeps only the class name. R8 will remove all methods and fields if they are not
|
|
64
|
+
used.
|
|
65
|
+
|
|
66
|
+
-keep class com.example.MyClass
|
|
67
|
+
|
|
68
|
+
## 8. Modifiers without Member Specification
|
|
69
|
+
|
|
70
|
+
Keeps the class entry point using modifiers, but implies no specific member
|
|
71
|
+
retention logic in the rule itself
|
|
72
|
+
|
|
73
|
+
-keep,allowobfuscation class com.example.MyClass
|
|
74
|
+
-keep,allowshrinking class com.example.MyClass
|
|
75
|
+
-keep,allowaccessmodification class com.example.MyClass
|
|
76
|
+
|
|
77
|
+
## 9. Conditional Keep Rules
|
|
78
|
+
|
|
79
|
+
Only triggers if specific conditions are met (e.g., if class members exist).
|
|
80
|
+
These are the most narrow and optimization-friendly rules.
|
|
81
|
+
|
|
82
|
+
-keepclassmembers class com.example.MyClass { <fields>; }
|
|
83
|
+
-keepclasseswithmembers class * { native <methods>; }
|