gradle-build-performance

Diagnose and optimize slow Android Gradle builds using build scans and caching.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/w0lzard/Wolzard-s-Marketplace --skill gradle-build-performance-w0lzard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gradle-build-performance
Source: https://github.com/w0lzard/Wolzard-s-Marketplace/tree/main/plugins/personal-skills/skills/gradle-build-performance
Command: npx skills add https://github.com/w0lzard/Wolzard-s-Marketplace --skill gradle-build-performance-w0lzard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Android and Gradle builds often become painfully slow as projects grow, wasting developer time and CI resources. 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 which build phase is slow. - 12 Optimization Patterns: Enable configuration cache, build cache, parallel execution, migrate kapt to KSP, pin dependency versions, eliminate configuration-phase I/O, and more. - Bottleneck Lookup Tables: Map symptoms (slow configuration, slow execution, slow dependency resolution) to specific causes and fixes. - Use Case: Your CI pipeline takes 25 minutes per build. Use this Skill to generate a build scan, discover kapt is dominating execution time, migrate Hilt and Room to KSP, enable the configuration cache, and cut build time significantly. ## Quick Start Analyze my Android project's Gradle build performance and recommend optimizations to make the build 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, and apply one optimization at a time while measuring results.

How to migrate from kapt to KSP in an Android project?

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 is roughly twice as fast as kapt and is mandatory for AGP 9 compatibility.

Does Gradle configuration cache work with Android projects?

Yes, configuration cache is supported on AGP 8.0 and later. Enable it with org.gradle.configuration-cache=true in gradle.properties, starting with problems=warn mode and moving to fail once your build is clean of configuration-phase I/O.

Why is my Gradle configuration phase slow?

Slow configuration is usually caused by eager task creation with tasks.create(), file or network I/O during configuration, or subprojects/allprojects blocks in the root build file. Fix these by using tasks.register(), deferring I/O with providers, and adopting convention plugins.

What causes Gradle build cache misses?

Cache misses typically come from non-deterministic task inputs, dynamic dependency versions like 1.+, or tasks that were never marked cacheable. Enable org.gradle.caching=true, pin exact dependency versions, and audit task inputs for stability.