How we brought down our build times. General optimization tips
summary
Pinterest cuts p95 Android build time ~31% (11:05→7:36) and P50 from 1:25 to 32s by combining concrete fixes: use Gradle Enterprise to surface cache misses, enable parallel Gradle/kapt execution and cache for kapt, add tiny Kotlin classes to Java-only modules to restore incremental cache, switch to non‑transitive R classes, remove empty folders, stop environment‑dependent buildConfig values, enlarge remote cache and restrict which CI tasks push to it. Clean local builds fall from minutes to ~50s and main‑branch builds hit remote cache ~60% of the time.
AI-written summary · about
chapters (13)
- 0:00Introduction and agenda
- 1:09Build times before optimizations
- 3:17Current build times and improvements
- 5:48Gradle Enterprise overview
- 8:16Parallelization opportunities
- 9:47Modularization efforts
- 10:33Incremental cache optimizations
- 14:49Local cache optimizations
- 18:06Remote cache setup and fixes
- 25:12Development experience tweaks
- 27:41Remote builds considerations
- 28:04Results and achievements
- 29:30Future plans and hiring
related talks
30mImproving Android Build performance
35mGradle recipes for reducing your build times
32mFaster Feedback Cut Gradle Build and Pipeline Times in Half
27mFaster builds on Android: from 2 minutes to 2 seconds
31mImproving Android Build performance
17mBoosting your Android CI through integrating Build Cache
35mHow we brought down our build times. Modularization impact on build speeds and metrics
57mImprove Build Times in Less Time
