Coupang Seongchul Park Aug 3, 2022

Android App Modularization Strategy

Article Summary

Seongchul Park from Coupang reveals how they tamed a 300,000+ line monolithic Android codebase. The build times were spiraling, new features were getting tangled, and Google's modern deployment features were out of reach.

This is Part 2 of Coupang's Android architecture series, focusing on their modularization journey. As Korea's leading e-commerce platform expanded into new business areas, their single-module app became unsustainable. The team needed a systematic approach to break apart their monolith while maintaining stability.

Key Takeaways

Critical Insight

Coupang successfully modularized their massive Android app into 13+ independent modules, dramatically improving build times, code reusability, and maintainability across their entire mobile ecosystem.

Part 3 reveals their repackaging strategy for eliminating stubborn dependencies that traditional modularization couldn't solve.

About This Article

Problem

Coupang's Android codebase had grown to over 300,000 lines of code. This size made builds slower and blocked the team from using Google's Instant Apps and App Bundles features.

Solution

Seongchul Park's team broke the codebase into three types of modules: app modules, feature modules, and core modules. They used library plugins in build.gradle and added configuration injection to keep dependencies between modules low.

Impact

The team ended up with 13 independent core modules, each with 80% or higher unit test coverage. Other Coupang mobile projects beyond the main e-commerce app can now reuse this code.