Iteration Speeds with Gradle Configuration Cache
summary
Gradle stores and reuses the configuration phase to cut iteration overhead: AndroidX (786 projects) drops a 42s configure+run into about 4s, roughly 32x faster for simple test iterates. Workflow uses Gradle’s configuration cache, inspects results with GCC and SpeedScope output, and gains extra parallel task execution. Common blockers are reading files or env vars during configuration, init scripts, and nonserializable custom types. Practical path: enable warn mode, upgrade plugins, fix build logic, add CI checks that validate cache hits.
AI-written summary · about
chapters (18)
- 0:00Faster iteration with Gradle
- 3:10Gradle’s build phases
- 5:15Configuration cache reduces overhead
- 6:18Configuration cache benefits
- 8:43Parallel task execution
- 11:27How config cache works
- 12:30Debugging with GCC tool
- 14:56Common cache issues
- 17:45Dynamic logic invalidation
- 20:59Config phase file pitfalls
- 23:04Init scripts break cache
- 24:49Environment variables and system properties issues
- 26:57Hidden file tree inputs
- 31:55Third-party plugin issues
- 32:18Android X adoption journey
- 34:47Handling regressions
- 35:52Feature requests
- 36:13Key takeaways
related talks
33mIMPROVING ANDROID BUILD PERFORMANCE
47mBuild times breaking your flow? Learn how to speed them up!
40mBuild times breaking your flow? Learn how to make them fast!
37mCache once and use everywhere
27mFaster builds on Android: from 2 minutes to 2 seconds
43mSqueezing the last drop of performance out of your Gradle builds (en)
30mImproving Android Build performance
19mGetting to a green build with caching on CI
