gradle-build-performance — community gradle-build-performance, SnapletApp, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Ideal for Android Development Agents focused on optimizing Kotlin Jetpack Compose projects with enhanced Gradle build performance capabilities. Locket Clone App using Kotlin Jetpack compose

thinhtt264 thinhtt264
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The gradle-build-performance skill by thinhtt264 is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Ideal for Android Development Agents focused on optimizing Kotlin Jetpack Compose projects with enhanced Gradle build performance capabilities.

Core Value

Empowers agents to analyze and optimize Gradle build scans, identify configuration versus execution bottlenecks, and enable Gradle Configuration Cache for reduced build times, leveraging Kotlin and Gradle-specific features like kapt/KSP annotation processing.

Capabilities Granted for gradle-build-performance

Analyzing Gradle build scans for performance regressions
Optimizing CI/CD build times through Gradle configuration adjustments
Debugging kapt/KSP annotation processing issues in Kotlin projects

! Prerequisites & Limits

  • Requires Gradle build environment
  • Kotlin and Jetpack Compose project compatibility necessary
  • Gradle Configuration Cache support needed for optimal performance
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

gradle-build-performance

Install gradle-build-performance, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command...

SKILL.md
Readonly

Gradle Build Performance

When to Use

  • Build times are slow (clean or incremental)
  • Investigating build performance regressions
  • Analyzing Gradle Build Scans
  • Identifying configuration vs execution bottlenecks
  • Optimizing CI/CD build times
  • Enabling Gradle Configuration Cache
  • Reducing unnecessary recompilation
  • Debugging kapt/KSP annotation processing

Example Prompts

  • "My builds are slow, how can I speed them up?"
  • "How do I analyze a Gradle build scan?"
  • "Why is configuration taking so long?"
  • "Why does my project always recompile everything?"
  • "How do I enable configuration cache?"
  • "Why is kapt so slow?"

Workflow

  1. Measure Baseline — Clean build + incremental build times
  2. Generate Build Scan./gradlew assembleDebug --scan
  3. Identify Phase — Configuration? Execution? Dependency resolution?
  4. Apply ONE optimization — Don't batch changes
  5. Measure Improvement — Compare against baseline
  6. Verify in Build Scan — Visual confirmation

Quick Diagnostics

Generate Build Scan

bash
1./gradlew assembleDebug --scan

Profile Build Locally

bash
1./gradlew assembleDebug --profile 2# Opens report in build/reports/profile/

Build Timing Summary

bash
1./gradlew assembleDebug --info | grep -E "^\:.*" 2# Or view in Android Studio: Build > Analyze APK Build

Build Phases

PhaseWhat HappensCommon Issues
Initializationsettings.gradle.kts evaluatedToo many include() statements
ConfigurationAll build.gradle.kts files evaluatedExpensive plugins, eager task creation
ExecutionTasks run based on inputs/outputsCache misses, non-incremental tasks

Identify the Bottleneck

Build scan → Performance → Build timeline
  • Long configuration phase: Focus on plugin and buildscript optimization
  • Long execution phase: Focus on task caching and parallelization
  • Dependency resolution slow: Focus on repository configuration

12 Optimization Patterns

1. Enable Configuration Cache

Caches configuration phase across builds (AGP 8.0+):

properties
1# gradle.properties 2org.gradle.configuration-cache=true 3org.gradle.configuration-cache.problems=warn

2. Enable Build Cache

Reuses task outputs across builds and machines:

properties
1# gradle.properties 2org.gradle.caching=true

3. Enable Parallel Execution

Build independent modules simultaneously:

properties
1# gradle.properties 2org.gradle.parallel=true

4. Increase JVM Heap

Allocate more memory for large projects:

properties
1# gradle.properties 2org.gradle.jvmargs=-Xmx4g -XX:+UseParallelGC

5. Use Non-Transitive R Classes

Reduces R class size and compilation (AGP 8.0+ default):

properties
1# gradle.properties 2android.nonTransitiveRClass=true

6. Migrate kapt to KSP

KSP is 2x faster than kapt for Kotlin:

kotlin
1// Before (slow) 2kapt("com.google.dagger:hilt-compiler:2.51.1") 3 4// After (fast) 5ksp("com.google.dagger:hilt-compiler:2.51.1")

7. Avoid Dynamic Dependencies

Pin dependency versions:

kotlin
1// BAD: Forces resolution every build 2implementation("com.example:lib:+") 3implementation("com.example:lib:1.0.+") 4 5// GOOD: Fixed version 6implementation("com.example:lib:1.2.3")

8. Optimize Repository Order

Put most-used repositories first:

kotlin
1// settings.gradle.kts 2dependencyResolutionManagement { 3 repositories { 4 google() // First: Android dependencies 5 mavenCentral() // Second: Most libraries 6 // Third-party repos last 7 } 8}

9. Use includeBuild for Local Modules

Composite builds are faster than project() for large monorepos:

kotlin
1// settings.gradle.kts 2includeBuild("shared-library") { 3 dependencySubstitution { 4 substitute(module("com.example:shared")).using(project(":")) 5 } 6}

10. Enable Incremental Annotation Processing

properties
1# gradle.properties 2kapt.incremental.apt=true 3kapt.use.worker.api=true

11. Avoid Configuration-Time I/O

Don't read files or make network calls during configuration:

kotlin
1// BAD: Runs during configuration 2val version = file("version.txt").readText() 3 4// GOOD: Defer to execution 5val version = providers.fileContents(file("version.txt")).asText

12. Use Lazy Task Configuration

Avoid create(), use register():

kotlin
1// BAD: Eagerly configured 2tasks.create("myTask") { ... } 3 4// GOOD: Lazily configured 5tasks.register("myTask") { ... }

Common Bottleneck Analysis

Slow Configuration Phase

Symptoms: Build scan shows long "Configuring build" time

Causes & Fixes:

CauseFix
Eager task creationUse tasks.register() instead of tasks.create()
buildSrc with many dependenciesMigrate to Convention Plugins with includeBuild
File I/O in build scriptsUse providers.fileContents()
Network calls in pluginsCache results or use offline mode

Slow Compilation

Symptoms: :app:compileDebugKotlin takes too long

Causes & Fixes:

CauseFix
Non-incremental changesAvoid build.gradle.kts changes that invalidate cache
Large modulesBreak into smaller feature modules
Excessive kapt usageMigrate to KSP
Kotlin compiler memoryIncrease kotlin.daemon.jvmargs

Cache Misses

Symptoms: Tasks always rerun despite no changes

Causes & Fixes:

CauseFix
Unstable task inputsUse @PathSensitive, @NormalizeLineEndings
Absolute paths in outputsUse relative paths
Missing @CacheableTaskAdd annotation to custom tasks
Different JDK versionsStandardize JDK across environments

CI/CD Optimizations

Remote Build Cache

kotlin
1// settings.gradle.kts 2buildCache { 3 local { isEnabled = true } 4 remote<HttpBuildCache> { 5 url = uri("https://cache.example.com/") 6 isPush = System.getenv("CI") == "true" 7 credentials { 8 username = System.getenv("CACHE_USER") 9 password = System.getenv("CACHE_PASS") 10 } 11 } 12}

Gradle Enterprise / Develocity

For advanced build analytics:

kotlin
1// settings.gradle.kts 2plugins { 3 id("com.gradle.develocity") version "3.17" 4} 5 6develocity { 7 buildScan { 8 termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use") 9 termsOfUseAgree.set("yes") 10 publishing.onlyIf { System.getenv("CI") != null } 11 } 12}

Skip Unnecessary Tasks in CI

bash
1# Skip tests for UI-only changes 2./gradlew assembleDebug -x test -x lint 3 4# Only run affected module tests 5./gradlew :feature:login:test

Android Studio Settings

File → Settings → Build → Gradle

  • Gradle JDK: Match your project's JDK
  • Build and run using: Gradle (not IntelliJ)
  • Run tests using: Gradle

File → Settings → Build → Compiler

  • Compile independent modules in parallel: ✅ Enabled
  • Configure on demand: ❌ Disabled (deprecated)

Verification Checklist

After optimizations, verify:

  • Configuration cache enabled and working
  • Build cache hit rate > 80% (check build scan)
  • No dynamic dependency versions
  • KSP used instead of kapt where possible
  • Parallel execution enabled
  • JVM memory tuned appropriately
  • CI remote cache configured
  • No configuration-time I/O

References

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is gradle-build-performance?

Ideal for Android Development Agents focused on optimizing Kotlin Jetpack Compose projects with enhanced Gradle build performance capabilities. Locket Clone App using Kotlin Jetpack compose

How do I install gradle-build-performance?

Run the command: npx killer-skills add thinhtt264/SnapletApp/gradle-build-performance. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for gradle-build-performance?

Key use cases include: Analyzing Gradle build scans for performance regressions, Optimizing CI/CD build times through Gradle configuration adjustments, Debugging kapt/KSP annotation processing issues in Kotlin projects.

Which IDEs are compatible with gradle-build-performance?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for gradle-build-performance?

Requires Gradle build environment. Kotlin and Jetpack Compose project compatibility necessary. Gradle Configuration Cache support needed for optimal performance.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add thinhtt264/SnapletApp/gradle-build-performance. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use gradle-build-performance immediately in the current project.

Related Skills

Looking for an alternative to gradle-build-performance or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI