Gradle recipes for reducing your build times
summary
An app with 30+ modules and 1,400 developers reduces incremental local build time from ~14 minutes to ~2 minutes by pruning plugins, switching KAPT to KSP/Anvil where possible, enabling build caching and configuration caching, preferring lazy APIs like tasks.register over eager task creation, disabling Jetifier and unnecessary build variants, using convention plugins instead of buildSrc, and measuring changes with Gradle Profiler or Gradle Enterprise; switching to M1 machines halves the remaining time.
AI-written summary · about
chapters (13)
- 0:00Introduction to Gradle
- 1:52Understanding Gradle tasks
- 5:24Projects and plugins in Gradle
- 7:10Gradle lifecycle phases
- 9:39Initial build setup issues
- 11:22Easy Gradle performance wins
- 14:27Best practices for build scripts
- 20:50Custom tasks and caching
- 25:26Dependency management tips
- 26:32Configuration caching benefits
- 29:53Disabling unnecessary features
- 30:36Convention plugins approach
- 32:43Measuring build performance
related talks
40mNail your Gradle build time
30mHow we brought down our build times. General optimization tips
32mFaster Feedback Cut Gradle Build and Pipeline Times in Half
27mFaster builds on Android: from 2 minutes to 2 seconds
30mImproving Android Build performance
36mImproving Gradle Builds
43mSqueezing the last drop of performance out of your Gradle builds (en)
33mImprove the build times of your project
