Android at Scale @Square
summary
Square’s Android Point of Sale repo moves from a tangled “hairball” to a mono-repo of many small libraries by enforcing public/impl/impl-wiring modules, banning impl→impl dependencies, and using fakes to cut transitive deps. A 40-injected-object anti-pattern appears in legacy code, the hairball takes two years to kill, development apps drive fast iteration with development apps under 10s builds, and main-app compile time falls from 4+ minutes to ~2 minutes after fixing a Gradle memory leak and tuning with Gradle profiler. The module split enables swapping implementations and faster, isolated UI testing.
AI-written summary · about
chapters (17)
- 0:00Introduction and background
- 1:13Growing from a single app
- 2:39Breaking the hairball problem
- 4:43Mono repository benefits
- 6:30Module size and dependencies
- 7:13What is a module?
- 8:36Advantages of modular design
- 9:58Why dependency inversion?
- 12:05Separating API and implementation
- 13:50New module structure at Square
- 17:20Adopting the new structure
- 18:46Benefits of separation
- 20:10Development apps explained
- 22:59Workflow library and navigation
- 25:29Using fakes to reduce dependencies
- 27:58Build time optimization
- 30:03Key takeaways and conclusion








