Reducing Android Build Time at Scale
Article Summary
Patrick Brochado from BlaBlaCar turned a 13-minute Android build into a 4-minute one. His team was losing 8 hours of productivity every single day to slow builds.
BlaBlaCar's Android team tackled their painful build times using Gradle optimization and build analysis tools. Rather than waiting for a complete modularization rewrite, they focused on quick wins that could deliver immediate results with measured effort.
Key Takeaways
- Upgrading dependencies with incremental annotation processing saved 2 minutes per build
- Antivirus whitelisting delivered the biggest win: 5 minutes saved
- Configuration cache and file system watching cut another 90 seconds
- Proper api vs implementation keywords reduced build time by 30 seconds
Five targeted optimizations reduced build time by 70% (from 13 to 4 minutes), saving the 12-person team 8 hours of productivity daily.
About This Article
BlaBlaCar's Android team found that the Gradle daemon wasn't being reused consistently between Android Studio and terminal builds. This caused unnecessary recompilation and wasted cache benefits.
Patrick Brochado's team made sure JAVA_HOME was correctly set in terminal environments and matched the JDK location in Android Studio settings. This allowed the same Gradle daemon to be shared across both build contexts.
The daemon optimization reduced build time by 1 minute 30 seconds. File system watching and configuration cache features were also enabled, which improved incremental build performance through better memory-based caching.