gradle-build-performance

Diagnoses and optimizes slow Android Gradle builds using build scans and configuration tuning.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/chmonya-inc/dnd-manager --skill gradle-build-performance-chmonya-inc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gradle-build-performance
Source: https://github.com/chmonya-inc/dnd-manager/tree/main/.agents/skills/gradle-build-performance
Command: npx skills add https://github.com/chmonya-inc/dnd-manager --skill gradle-build-performance-chmonya-inc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Android and Gradle builds often become painfully slow as projects grow, wasting developer time on every compile. This Skill provides a systematic workflow to measure build performance, identify bottlenecks across initialization, configuration, and execution phases, and apply proven optimizations one at a time. ## Core Features & Use Cases - Build Scan Diagnostics: Generate and interpret Gradle Build Scans and local profile reports to pinpoint slow phases. - 12 Optimization Patterns: Enable configuration cache, build cache, parallel execution, migrate kapt to KSP, pin dependency versions, and eliminate configuration-phase I/O. - Bottleneck Lookup Tables: Map symptoms (slow configuration, execution, or dependency resolution) to specific causes and fixes. - Use Case: Your CI pipeline takes 20 minutes per build. Use this Skill to generate a build scan, discover kapt is the bottleneck, migrate to KSP, enable the build cache, and cut build time significantly. ## Quick Start Analyze my Gradle build performance and recommend optimizations to make my Android builds faster.

Frequently Asked Questions about gradle-build-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I speed up a slow Gradle build in Android Studio?▼

Start by generating a Build Scan with ./gradlew assembleDebug --scan to identify the slow phase. Then enable configuration cache, build cache, and parallel execution in gradle.properties, applying one optimization at a time and measuring after each change.

How to migrate from kapt to KSP in Android projects?▼

Replace kapt dependency declarations with ksp equivalents for supported libraries like Hilt, Room, and Moshi, and swap the kotlin-kapt plugin for com.google.devtools.ksp. KSP runs roughly twice as fast as kapt and is mandatory for AGP 9 compatibility.

What is the Gradle configuration cache and should I enable it?▼

The configuration cache skips the configuration phase on subsequent builds when inputs have not changed, available in AGP 8.0+. Enable it with org.gradle.configuration-cache=true, starting with problems=warn before moving to fail mode.

Why is my Gradle build cache missing on CI?▼

Cache misses typically result from non-deterministic task inputs, dynamic dependency versions, or the build cache not being enabled. Set org.gradle.caching=true, pin exact dependency versions, and audit tasks for unstable inputs like timestamps.

Does kapt work with AGP 9?▼

No, org.jetbrains.kotlin.kapt is incompatible with AGP 9's built-in Kotlin support. Migrate to KSP 2.3.1 or later, or use the com.android.legacy-kapt plugin as a transitional fallback for processors without KSP equivalents.

Why is my Gradle configuration phase slow?▼

Slow configuration usually comes from eager task creation with tasks.create, file or network I/O during configuration, or subprojects/allprojects blocks. Use tasks.register, defer I/O with providers, and replace subproject blocks with convention plugins.