GrabAmar JainProblem & solution
App Modularisation at Scale
Summary
Grab transitioned its monolithic mobile application into a modular architecture to resolve increasing code conflicts, slow releases, and difficult team collaboration. The team decomposed the single module by establishing base infrastructure modules, shared UI and utility libraries, discrete feature modules, and bridge kit modules for inter-module communication. Dependency injection using Dagger ties these components together in the main app module while preventing feature modules from directly depending on one another. The architecture spans over 1,000 modules across the app, with more than 200 modules in the Grab Financial Group payments domain where over 95% of modules build in under 15 seconds. This approach accelerated Gradle CI and local builds through parallel compilation and caching, though it increased Gradle sync times, IDE memory usage, and configuration maintenance overhead.
Context
Grab's monolithic app architecture placed all UI and business logic in a single module, leading to heavy code coupling, frequent code conflicts, slower development cycles, and difficult collaboration as new features and engineers were added.
Approach / What changed
The engineering team decomposed the codebase by creating Base/Core infrastructure modules, Shared Library modules, independent Feature modules, Kit modules for inter-module communication abstractions, and an App hub module using Dagger dependency injection.
Takeaways
Preventing feature modules from directly depending on each other enables Gradle to build independent modules in parallel across CPU cores.
The modular architecture reduced build times in the Grab Financial Group payments domain so that more than 95% of its 200+ modules build in less than 15 seconds.
Modularisation trade-offs include higher IDE memory usage, increased Gradle sync times, and the ongoing maintenance of separate configuration files per module.
Source and freshness
- Source
- engineering.grab.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.