gradle-build-performance

Analyze Gradle build scans to identify and reduce Android build bottlenecks.

915|88|Updated Feb 6, 2024
One-click install
npx skills add https://github.com/new-silvermoon/awesome-android-agent-skills --skill gradle-build-performance-new-silvermoon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gradle-build-performance
Source: https://github.com/new-silvermoon/awesome-android-agent-skills/tree/main/.github/skills/gradle-build-performance
Command: npx skills add https://github.com/new-silvermoon/awesome-android-agent-skills --skill gradle-build-performance-new-silvermoon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill speeds up Android/Gradle builds by guiding actionable improvements to reduce build times and boost developer productivity.

Core Features & Use Cases

  • Workflow guidance: Steps to measure baseline times, generate build scans, profile builds, and apply targeted optimizations.
  • Optimization patterns: Enable configuration cache, build cache, parallel execution, incremental annotation processing, and dependency pinning.
  • Use Case: When a team experiences slow incremental builds, this skill helps pinpoint whether configuration or execution is the bottleneck and suggests concrete changes to Gradle files and project structure.

Quick Start

Run a baseline build with ./gradlew clean assembleDebug to establish a baseline, then generate a build scan with ./gradlew assembleDebug --scan and review the Build Scan to identify bottlenecks. Apply one optimization at a time and re-check 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 speed up slow Gradle builds for Android?

Speed up slow Gradle builds by enabling configuration cache, build cache, parallel execution, and profiling workflows to reduce build times and boost developer productivity.

How do I profile a Gradle build to find bottlenecks?

Profile a Gradle build by running a baseline build, generating a build scan with the --scan flag, and analyzing the scan to pinpoint whether configuration or execution is the bottleneck.

Does Gradle configuration cache help with incremental builds?

Yes, Gradle configuration cache helps with incremental builds by caching the configuration phase, reducing build times for subsequent runs and improving developer productivity.

What's the best way to reduce Android CI/CD pipeline build times?

Reduce Android CI/CD pipeline build times by applying targeted optimizations like enabling Gradle build cache, parallel execution, and incremental annotation processing.

Why does my clean Gradle build take so long?

A clean Gradle build takes long because it bypasses caches and re-executes all tasks, but you can reduce times by enabling configuration cache and parallel execution.

Can I use Gradle build scan to diagnose slow execution?

Yes, you can generate a Gradle build scan to diagnose slow execution by identifying specific task bottlenecks and actionable improvements to apply to your project.