gradle-build-performance

Diagnose Android Gradle build bottlenecks using build scans and apply targeted optimizations.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/kotlinknight/NutriSoloAndroid --skill gradle-build-performance-kotlinknight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gradle-build-performance
Source: https://github.com/kotlinknight/NutriSoloAndroid/tree/main/.agents/skills/gradle-build-performance
Command: npx skills add https://github.com/kotlinknight/NutriSoloAndroid --skill gradle-build-performance-kotlinknight

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Android/Gradle builds can be slow due to configuration overhead, dependency resolution, and execution bottlenecks. This Skill helps diagnose bottlenecks using build scans, enable configuration cache, migrate kapt to KSP, fix cache misses, and optimize CI/CD build times to accelerate developer workflows.

Core Features & Use Cases

  • Measure baseline build and incremental times to establish performance metrics.
  • Generate a Build Scan with ./gradlew assembleDebug --scan and analyze results.
  • Identify the slow phase (Initialization, Configuration, or Execution) and apply targeted optimizations one at a time.
  • Validate improvements by re-running builds and comparing metrics in CI/CD.

Quick Start

Run a clean Gradle build, generate a Build Scan with ./gradlew assembleDebug --scan, then apply one optimization at a time and verify improvements.

Frequently Asked Questions about gradle-build-performance

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

FAQPage Schema
How do I diagnose slow Android Gradle builds?

To diagnose slow Android Gradle builds, generate a Build Scan using ./gradlew assembleDebug --scan and analyze the results to identify bottlenecks in the initialization, configuration, or execution phases.

What is the best way to speed up Gradle configuration time?

The best way to speed up Gradle configuration time is enabling the Gradle configuration cache, which significantly reduces overhead by caching the project configuration state for subsequent builds.

How do I migrate kapt to KSP for Android build performance?

To migrate kapt to KSP and improve Android build performance, gradually replace kapt annotation processors with KSP processors, then verify the execution time improvements by re-running builds and comparing metrics.

Can I use Gradle build scans to optimize CI/CD pipelines?

Yes, you can use Gradle build scans to optimize CI/CD pipelines by measuring baseline build times, applying targeted optimizations, and validating improvements by comparing build metrics across pipeline runs.

Why does my Gradle build cache miss in CI?

Gradle build cache misses in CI often occur due to uncacheable tasks or inconsistent inputs; diagnose these specific execution bottlenecks by analyzing your build scan and fixing cache misses to reduce build times.