Effective DI for Multi Module Project
summary
Gojek moved a monolithic Android codebase into a 150+ module multimodule repo (20+ product teams) using Dagger2 components and explicit feature scope annotations, a single core singleton component for expensive objects, lazy initialization and a Provider interface to get the core component from context. Concrete rules: prefer component dependencies over subcomponents (removes cyclic graphs and speeds compile), use binds over provides, avoid Dagger-Android boilerplate, and migrate new code to Hilt.
AI-written summary · about
chapters (12)
- 0:00Introduction and speaker intro
- 3:39Problem with monolithic architecture
- 7:08Benefits of modularization
- 11:44Inversion of Control principle
- 15:58Modularization vs Dagger dependency
- 18:03Avoiding subcomponents in Dagger
- 22:44Implementing feature scoping
- 25:14Core component provider mechanism
- 28:00Activity scoping with Dagger
- 31:07Pro tips for Dagger usage
- 32:10Q&A session begins
- 44:05Closing remarks
related talks
32mBuild a modular Android app architecture
32mUsing Hilt in a Multi-Module Project
40mModularizing Android Applications
45mDagger 2 - Back to Basics
28mDependency Injection You Can Start Today
29mForging the Dagger for the modern Android world
20mBreaking Down Modularization
27mUsing Dagger2 to Keep Android SDK Dependencies Clean
