Glovo: Accelerate Your Android Development: Top Techniques to Reduce Gradle Build Time (Part I of II)
Original post Accelerate Your Android Development: Top Techniques to Reduce Gradle Build Time (Part I of II)
Article Summary
Rolgalan from Glovo cut Android build times by 75%—from 1 hour down to 15 minutes. Here's how they did it, and why most teams are leaving massive performance gains on the table.
This deep dive from Glovo's Mobile Platform team breaks down the most impactful Gradle optimization techniques that go beyond simple flag-flipping. While Gradle's documentation covers the basics, this article reveals the nuanced implementation details and architectural decisions that actually deliver results.
Key Takeaways
- Parallel execution alone saved 24 minutes per build (30 min serial to 6 min parallel)
- Remote cache cut CI build times in half after increasing storage from 10GB to 100GB
- Configuration Cache enables intra-module task parallelization, not just module-level parallelization
- Flattening module dependency graphs is critical: parallelization only works on independent modules
- Dynamic BuildConfig values and manifest properties silently kill cache effectiveness across builds
Glovo reduced Android CI build times from 60 minutes to 15 minutes by properly implementing parallel tasks, remote caching with adequate storage, and eliminating dynamic build inputs that invalidate caches.
Continue reading
What This Article Covers
Glovo's Android CI builds were taking about an hour to finish. This created long feedback loops that slowed down pull request merges and hurt developer productivity while waiting for build validation.
The team turned on parallel task execution with org.gradle.parallel=true, set up a remote Gradle build cache with 100GB of storage, and removed dynamic BuildConfig values that were breaking cache entries between builds.
Build times dropped from 60 minutes down to 15 minutes on average, a 75% improvement. Remote cache hit rates also went up from 82% to 96% after the storage optimization, which meant engineers spent less time waiting around for builds to finish.
This page summarizes “Accelerate Your Android Development: Top Techniques to Reduce Gradle Build Time (Part I of II)” by Glovo, published Oct 23, 2023. All credit for the original work goes to the authors.