Framework for identifying bottlenecks in Gradle builds and implementing performance optimizations.
Install
mkdir -p .claude/skills/gradle-build-performance && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15526" && unzip -o skill.zip -d .claude/skills/gradle-build-performance && rm skill.zipInstalls to .claude/skills/gradle-build-performance
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Diagnosing and optimising Android build times — configuration cache, build cache, KSP vs kapt, parallel execution, and CI/CD best practices.Key capabilities
- →Establish baseline build measurements
- →Generate build scans for analysis
- →Identify bottlenecked build phases
- →Apply single optimization strategies
- →Verify changes in build scan data
How it works
The guide recommends a systematic approach: establish baseline measurements, generate build scans, identify bottlenecked phases, apply single optimizations, measure improvements, and verify changes in build scan data.
Inputs & outputs
When to use gradle-build-performance
- →Reducing slow Android build times
- →Optimizing CI/CD build performance
- →Analyzing build scans for regressions
About this skill
Gradle Build Performance Guide
This resource provides a comprehensive framework for diagnosing and improving Android/Gradle build times. It's designed for developers experiencing slow builds, investigating performance regressions, or optimizing CI/CD pipelines.
Key Workflow
The guide recommends a systematic approach: establish baseline measurements, generate build scans for analysis, identify which phase is bottlenecked (initialization, configuration, or execution), apply single optimizations, measure improvements, and verify changes in build scan data.
Primary Optimization Strategies
The document outlines 12 optimization patterns, including enabling configuration and build caching, parallel execution, and migrating from kapt to KSP annotation processing. It emphasizes: "Caches configuration phase across builds" and notes that KSP offers approximately twice the performance of kapt for Kotlin projects.
Other strategies involve increasing JVM heap allocation, pinning dependency versions instead of using dynamic ranges, optimizing repository order, and deferring I/O operations from configuration time to execution time.
Troubleshooting Approach
The guide provides targeted solutions for common scenarios:
- Slow configuration: Replace eager task creation with lazy registration
- Slow compilation: Break large modules into smaller features or migrate annotation processors
- Cache misses: Standardize JDK versions and use proper task caching annotations
CI/CD Integration
For continuous integration environments, recommendations include configuring remote build caches, implementing Gradle Enterprise/Develocity for analytics, and selectively skipping unnecessary tasks based on change scope.
Braintraining Specifics
- This project already uses KSP (not kapt) for both Hilt and Room — a key performance advantage.
- Dependency versions are pinned in
gradle/libs.versions.toml— no dynamic version ranges. TYPESAFE_PROJECT_ACCESSORSis enabled for faster project dependency resolution.- Add
org.gradle.configuration-cache=trueandorg.gradle.caching=truetogradle.propertiesto further improve build times.
How it compares
This guide provides a structured, iterative process for build optimization, contrasting with ad-hoc adjustments by focusing on data-driven analysis from build scans.
Compared to similar skills
gradle-build-performance side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| gradle-build-performance (this skill) | 0 | 2mo | No flags | Intermediate |
| bazel-build-optimization | 14 | 2mo | No flags | Advanced |
| deployment-pipeline-design | 6 | 2mo | Review | Advanced |
| k8s-helm | 8 | 6mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
bazel-build-optimization
wshobson
Optimize Bazel builds for large-scale monorepos. Use when configuring Bazel, implementing remote execution, or optimizing build performance for enterprise codebases.
deployment-pipeline-design
wshobson
Design multi-stage CI/CD pipelines with approval gates, security checks, and deployment orchestration. Use when architecting deployment workflows, setting up continuous delivery, or implementing GitOps practices.
k8s-helm
rohitg00
Manage Helm charts, releases, and repositories. Use for Helm installations, upgrades, rollbacks, chart development, and release management.
cloudflare-deploy
davila7
Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.
gitlab-ci-patterns
wshobson
Build GitLab CI/CD pipelines with multi-stage workflows, caching, and distributed runners for scalable automation. Use when implementing GitLab CI/CD, optimizing pipeline performance, or setting up automated testing and deployment.
mlops-engineer
sickn33
Build comprehensive ML pipelines, experiment tracking, and model registries with MLflow, Kubeflow, and modern MLOps tools. Implements automated training, deployment, and monitoring across cloud platforms. Use PROACTIVELY for ML infrastructure, experiment management, or pipeline automation.