Meetup Colin Lee Aug 23, 2022

Simplifying Navigation in Multi-Module Android Apps

Article Summary

Meetup's Android team ditched Activities and Fragments for pure Jetpack Compose—and immediately noticed the performance difference. Here's how they navigated the complexity of multi-module apps.

The Meetup engineering team built two apps on Kotlin Multiplatform with shared business logic across modules. Navigation between modules became a major challenge until they discovered Compose Destinations—but the official examples were too complex for their needs.

Key Takeaways

Critical Insight

Meetup achieved noticeably faster screen loads by moving to Compose Destinations with a simpler setup than the official examples recommend.

The team's approach to conditional start routes based on auth state reveals a practical pattern most navigation guides skip entirely.

About This Article

Problem

Meetup's Android app had multiple modules built with different approaches. Some used legacy code, others used new Compose, and there was Kotlin Multiplatform shared logic too. Getting all these pieces to work together was messy, and the official Compose Destinations examples didn't really help.

Solution

Colin Lee's team built a NavGraphs.kt file for each app. They used KSP to generate destinations from every module, then configured compose-destinations.mode to 'destinations' and added a moduleName parameter. This automatically pulled all the module destinations together.

Impact

The new approach removed the need for complicated nested navigation graphs. Navigation stayed type-safe. Staff noticed screen load times improved noticeably compared to the old Fragment-based system.