gradle-build-performance

Diagnose Gradle build performance issues and implement optimizations.

Updated Mar 9, 2025
One-click install
npx skills add https://github.com/rock-hu/vitamin-compose --skill gradle-build-performance-rock-hu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gradle-build-performance
Source: https://github.com/rock-hu/vitamin-compose/tree/main/.github/skills/gradle-build-performance
Command: npx skills add https://github.com/rock-hu/vitamin-compose --skill gradle-build-performance-rock-hu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Debugging and optimizing Android/Gradle builds to dramatically reduce wait times and improve developer productivity.

Core Features & Use Cases

  • Baseline measurement and bottleneck identification in Android/Gradle projects.
  • Build scans generation and analysis for CI/CD workflows.
  • Targeted optimizations such as enabling configuration cache, parallel task execution, and build caching to reduce total build time.
  • Use Case: A mobile development team experiences long incremental builds and CI delays; this skill guides rapid diagnosis and improvement.

Quick Start

  • Run a baseline build to establish current performance: ./gradlew assembleDebug --scan
  • Open the Build Scan to identify bottlenecks and hot spots in configuration or execution
  • Apply a single optimization (e.g., enable configuration cache) and re-run to verify improvement

Frequently Asked Questions about gradle-build-performance

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

FAQPage Schema
How do I identify and fix Gradle build performance issues in my Android project?

To fix Gradle build performance issues, run a baseline build using the Gradle wrapper with the scan flag, analyze the generated build scan to identify bottlenecks, and apply targeted optimizations like enabling configuration cache or parallel task execution to reduce total build time.

Why does my Android Gradle build take so long and how can I diagnose it?

Your Android Gradle build may be slow due to configuration or execution bottlenecks. Diagnose it by generating a build scan using the Gradle wrapper, which reveals hot spots and guides targeted optimizations to dramatically reduce wait times and improve developer productivity.

What is the best way to optimize Gradle builds for CI/CD workflows?

The best way to optimize Gradle builds for CI/CD workflows is to generate and analyze build scans to pinpoint delays, then enable build caching and parallel task execution. This targeted approach reduces total build time and resolves CI delays across Android projects.

Do I need a Gradle-enabled project to use build scan analysis for performance optimization?

Yes, you need a Gradle-enabled project with the Gradle wrapper and profiling tools to measure, diagnose, and implement build performance optimizations. This environment is required to establish baseline measurements and verify improvements for slow Android builds.

How do I establish a baseline measurement to reduce Android build times?

To establish a baseline measurement for reducing Android build times, run the command './gradlew assembleDebug --scan' using the Gradle wrapper. This generates a build scan to identify bottlenecks and hot spots before applying individual optimizations like the configuration cache.

Can I enable configuration cache to speed up incremental Gradle builds?

Yes, enabling configuration cache is a targeted optimization to speed up incremental Gradle builds. After establishing a baseline and identifying bottlenecks via a build scan, apply the configuration cache and re-run the build to verify the performance improvement.