{"id":"d5970d1e-facb-401c-b6f4-65c0020cf8e4","shortId":"WbPSpg","kind":"skill","title":"android-gradle-build-performance","tagline":"Diagnose and improve Android and Gradle build performance with scans, cache checks, and bottleneck audits.","description":"# Android Gradle Build Performance\n\n## When To Use\n- Use this skill when the request is about: android gradle build performance, configuration cache android build, ksp vs kapt android.\n- Primary outcome: Diagnose and improve Android and Gradle build performance with scans, cache checks, and bottleneck audits.\n- Use this skill when the problem is build speed, task churn, cache misses, or CI wall time rather than build-logic structure.\n- Read `references/patterns.md` when you need the measurement ladder or the most common Gradle performance smells.\n- Read `references/scenarios.md` for audit-first entry points on the example projects.\n- Handoff skills when the scope expands:\n- `android-gradle-build-logic`\n- `android-ci-cd-release-playstore`\n\n## Workflow\n1. Identify whether the problem is local developer feedback time, CI build duration, or both.\n2. Measure one build path at a time with `--profile`, `--scan`, configuration-cache diagnostics, or the bundled audit script before proposing a fix.\n3. Check `gradle.properties`, plugin wiring, dependency declarations, task registration style, and module conventions for common performance smells.\n4. Apply one high-confidence optimization at a time, then compare before and after behavior instead of stacking changes.\n5. Hand off structural Gradle refactors or release-pipeline changes once the performance bottleneck is isolated.\n\n## Guardrails\n- Do not recommend broad rewrites when a single cache, plugin, or dependency pattern is the real bottleneck.\n- Separate measurement from speculation; call out what was observed vs inferred.\n- Prefer KSP, configuration cache, and lazy task configuration when the toolchain supports them.\n- Treat dynamic dependency versions, changing modules, and eager task creation as performance regressions unless there is a deliberate reason.\n- Keep CI guidance reproducible on the example projects before suggesting org-wide rollout.\n\n## Anti-Patterns\n- Turning on every Gradle flag without checking compatibility or failures.\n- Blaming AGP upgrades for slow builds without measuring task hot spots.\n- Mixing build-logic architecture advice with build-time diagnosis in one pass.\n- Using dynamic dependency versions that force repeated resolution work.\n\n## Review Focus\n- Configuration time vs execution time vs dependency resolution vs test wall time.\n- Configuration cache compatibility and lazy task registration.\n- KSP vs kapt and annotation-processor hotspots.\n- Remote/local cache value, dynamic dependencies, and CI-specific bottlenecks.\n\n## Examples\n### Happy path\n- Scenario: Audit the Compose fixture for build cache, configuration cache, KSP, and eager task creation smells.\n- Command: `python3 skills/android-gradle-build-performance/scripts/audit_build_performance.py examples/orbittasks-compose --json`\n\n### Edge case\n- Scenario: Compare XML and Compose fixture build settings before choosing a CI build optimization.\n- Command: `bash skills/android-gradle-build-performance/scripts/run_examples.sh`\n\n### Failure recovery\n- Scenario: Re-check a project after enabling performance flags so regressions are caught before rollout.\n- Command: `python3 skills/android-gradle-build-performance/scripts/audit_build_performance.py examples/orbittasks-xml`\n\n## Done Checklist\n- The bottleneck is tied to a specific phase, flag, plugin, or dependency pattern.\n- Proposed optimizations are measurable and reversible.\n- The recommended fix is compatible with the current Android and Gradle toolchain.\n- Structural Gradle work is handed off separately from performance tuning.\n\n## Official References\n- [https://docs.gradle.org/current/userguide/performance.html](https://docs.gradle.org/current/userguide/performance.html)\n- [https://docs.gradle.org/current/userguide/configuration_cache.html](https://docs.gradle.org/current/userguide/configuration_cache.html)\n- [https://docs.gradle.org/current/userguide/task_configuration_avoidance.html](https://docs.gradle.org/current/userguide/task_configuration_avoidance.html)\n- [https://developer.android.com/build/optimize-your-build](https://developer.android.com/build/optimize-your-build)\n- [https://developer.android.com/build/ksp](https://developer.android.com/build/ksp)","tags":["android","gradle","build","performance","agent","skills","krutikjain","agent-skills","android-development","android-skills","androidx","claude-code"],"capabilities":["skill","source-krutikjain","skill-android-gradle-build-performance","topic-agent-skills","topic-android","topic-android-development","topic-android-skills","topic-androidx","topic-claude-code","topic-codex","topic-cursor","topic-jetpack-compose","topic-kotlin","topic-skills"],"categories":["android-agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/krutikJain/android-agent-skills/android-gradle-build-performance","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add krutikJain/android-agent-skills","source_repo":"https://github.com/krutikJain/android-agent-skills","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (4,212 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:13:27.525Z","embedding":null,"createdAt":"2026-05-18T13:20:49.873Z","updatedAt":"2026-05-18T19:13:27.525Z","lastSeenAt":"2026-05-18T19:13:27.525Z","tsv":"'/build/ksp](https://developer.android.com/build/ksp)':511 '/build/optimize-your-build](https://developer.android.com/build/optimize-your-build)':508 '/current/userguide/configuration_cache.html](https://docs.gradle.org/current/userguide/configuration_cache.html)':502 '/current/userguide/performance.html](https://docs.gradle.org/current/userguide/performance.html)':499 '/current/userguide/task_configuration_avoidance.html](https://docs.gradle.org/current/userguide/task_configuration_avoidance.html)':505 '1':133 '2':148 '3':172 '4':189 '5':209 'advic':330 'agp':315 'android':2,9,21,36,42,47,53,122,127,481 'android-ci-cd-release-playstor':126 'android-gradle-build-log':121 'android-gradle-build-perform':1 'annot':374 'annotation-processor':373 'anti':302 'anti-pattern':301 'appli':190 'architectur':329 'audit':20,64,107,166,391 'audit-first':106 'bash':428 'behavior':204 'blame':314 'bottleneck':19,63,223,243,386,455 'broad':230 'build':4,12,23,38,43,56,72,85,124,144,151,319,327,333,396,419,425 'build-log':84,326 'build-tim':332 'bundl':165 'cach':16,41,60,76,161,235,258,363,378,397,399 'call':248 'case':412 'caught':445 'cd':129 'chang':208,219,272 'check':17,61,173,310,435 'checklist':453 'choos':422 'churn':75 'ci':79,128,143,288,384,424 'ci-specif':383 'command':406,427,448 'common':99,186 'compar':200,414 'compat':311,364,477 'compos':393,417 'confid':194 'configur':40,160,257,262,350,362,398 'configuration-cach':159 'convent':184 'creation':277,404 'current':480 'declar':178 'deliber':285 'depend':177,238,270,341,356,381,465 'develop':140 'developer.android.com':507,510 'developer.android.com/build/ksp](https://developer.android.com/build/ksp)':509 'developer.android.com/build/optimize-your-build](https://developer.android.com/build/optimize-your-build)':506 'diagnos':6,50 'diagnosi':335 'diagnost':162 'docs.gradle.org':498,501,504 'docs.gradle.org/current/userguide/configuration_cache.html](https://docs.gradle.org/current/userguide/configuration_cache.html)':500 'docs.gradle.org/current/userguide/performance.html](https://docs.gradle.org/current/userguide/performance.html)':497 'docs.gradle.org/current/userguide/task_configuration_avoidance.html](https://docs.gradle.org/current/userguide/task_configuration_avoidance.html)':503 'done':452 'durat':145 'dynam':269,340,380 'eager':275,402 'edg':411 'enabl':439 'entri':109 'everi':306 'exampl':113,293,387 'examples/orbittasks-compose':409 'examples/orbittasks-xml':451 'execut':353 'expand':120 'failur':313,430 'feedback':141 'first':108 'fix':171,475 'fixtur':394,418 'flag':308,441,462 'focus':349 'forc':344 'gradl':3,11,22,37,55,100,123,213,307,483,486 'gradle.properties':174 'guardrail':226 'guidanc':289 'hand':210,489 'handoff':115 'happi':388 'high':193 'high-confid':192 'hot':323 'hotspot':376 'identifi':134 'improv':8,52 'infer':254 'instead':205 'isol':225 'json':410 'kapt':46,371 'keep':287 'ksp':44,256,369,400 'ladder':95 'lazi':260,366 'local':139 'logic':86,125,328 'measur':94,149,245,321,470 'miss':77 'mix':325 'modul':183,273 'need':92 'observ':252 'offici':495 'one':150,191,337 'optim':195,426,468 'org':298 'org-wid':297 'outcom':49 'pass':338 'path':152,389 'pattern':239,303,466 'perform':5,13,24,39,57,101,187,222,279,440,493 'phase':461 'pipelin':218 'playstor':131 'plugin':175,236,463 'point':110 'prefer':255 'primari':48 'problem':70,137 'processor':375 'profil':157 'project':114,294,437 'propos':169,467 'python3':407,449 'rather':82 're':434 're-check':433 'read':88,103 'real':242 'reason':286 'recommend':229,474 'recoveri':431 'refactor':214 'refer':496 'references/patterns.md':89 'references/scenarios.md':104 'registr':180,368 'regress':280,443 'releas':130,217 'release-pipelin':216 'remote/local':377 'repeat':345 'reproduc':290 'request':33 'resolut':346,357 'revers':472 'review':348 'rewrit':231 'rollout':300,447 'scan':15,59,158 'scenario':390,413,432 'scope':119 'script':167 'separ':244,491 'set':420 'singl':234 'skill':30,67,116 'skill-android-gradle-build-performance' 'skills/android-gradle-build-performance/scripts/audit_build_performance.py':408,450 'skills/android-gradle-build-performance/scripts/run_examples.sh':429 'slow':318 'smell':102,188,405 'source-krutikjain' 'specif':385,460 'specul':247 'speed':73 'spot':324 'stack':207 'structur':87,212,485 'style':181 'suggest':296 'support':266 'task':74,179,261,276,322,367,403 'test':359 'tie':457 'time':81,142,155,198,334,351,354,361 'toolchain':265,484 'topic-agent-skills' 'topic-android' 'topic-android-development' 'topic-android-skills' 'topic-androidx' 'topic-claude-code' 'topic-codex' 'topic-cursor' 'topic-jetpack-compose' 'topic-kotlin' 'topic-skills' 'treat':268 'tune':494 'turn':304 'unless':281 'upgrad':316 'use':27,28,65,339 'valu':379 'version':271,342 'vs':45,253,352,355,358,370 'wall':80,360 'whether':135 'wide':299 'wire':176 'without':309,320 'work':347,487 'workflow':132 'xml':415","prices":[{"id":"2a9914d1-fee0-4ca3-80f0-341e98d70660","listingId":"d5970d1e-facb-401c-b6f4-65c0020cf8e4","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"krutikJain","category":"android-agent-skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:20:49.873Z"}],"sources":[{"listingId":"d5970d1e-facb-401c-b6f4-65c0020cf8e4","source":"github","sourceId":"krutikJain/android-agent-skills/android-gradle-build-performance","sourceUrl":"https://github.com/krutikJain/android-agent-skills/tree/main/skills/android-gradle-build-performance","isPrimary":false,"firstSeenAt":"2026-05-18T13:20:49.873Z","lastSeenAt":"2026-05-18T19:13:27.525Z"}],"details":{"listingId":"d5970d1e-facb-401c-b6f4-65c0020cf8e4","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"krutikJain","slug":"android-gradle-build-performance","github":{"repo":"krutikJain/android-agent-skills","stars":8,"topics":["agent-skills","android","android-development","android-skills","androidx","claude-code","codex","cursor","jetpack-compose","kotlin","skills"],"license":"mit","html_url":"https://github.com/krutikJain/android-agent-skills","pushed_at":"2026-03-25T05:47:20Z","description":"Android skills repository for Kotlin, Compose, XML, testing, CI, release work, and legacy upgrades","skill_md_sha":"ec4ed72153cd99d5b5025806551df31a40f1f9f8","skill_md_path":"skills/android-gradle-build-performance/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/krutikJain/android-agent-skills/tree/main/skills/android-gradle-build-performance"},"layout":"multi","source":"github","category":"android-agent-skills","frontmatter":{"name":"android-gradle-build-performance","description":"Diagnose and improve Android and Gradle build performance with scans, cache checks, and bottleneck audits."},"skills_sh_url":"https://skills.sh/krutikJain/android-agent-skills/android-gradle-build-performance"},"updatedAt":"2026-05-18T19:13:27.525Z"}}