Introducing Focus: A New Open Source Gradle Plugin
Article Summary
Ryan Harter from Dropbox just open-sourced a Gradle plugin that cuts Android Studio sync time by 87%. If you're tired of waiting on builds in large Android projects, this is for you.
Dropbox's monorepo contains nearly 600 Gradle projects, but engineers typically only work in a handful at a time. The new Focus plugin intelligently loads only the modules you need, dramatically improving IDE and build performance. It's now available on GitHub for the entire Android community.
Key Takeaways
- Dropbox reduced Android Studio sync from 2 minutes to 20 seconds in some cases
- Focus auto-generates settings files that include only required project dependencies
- Plugin works by creating a .focus file pointing to minimal module configuration
- Simple commands let you switch focus between modules or revert to full project
- Available now on Maven Central as an open source Gradle settings plugin
Critical Insight
Focus lets Android teams with large modular projects work faster by configuring only the modules they actually need, cutting sync times by up to 87%.