Introducing Nibel: A Navigation Library for Adopting Jetpack Compose in Fragment-Based Apps | by Pavlo Stavytskyi | Turo Engineering | Medium
Article Summary
Turo open-sourced Nibel, their solution to the messy problem of migrating fragment-based Android apps to Jetpack Compose without breaking everything.
Most Android teams face a painful choice: rewrite everything for Compose or stay stuck with fragments. Turo's engineering team built Nibel, a type-safe navigation library that lets you adopt Compose incrementally while maintaining compatibility with existing fragment-based code.
Key Takeaways
- Enables three navigation scenarios: fragment to compose, compose to compose, compose to fragment
- Uses KSP to generate type-safe navigation with @UiEntry annotations
- Supports multi-module navigation without direct dependencies between feature modules
- Two implementation types: Fragment for external entries, Composable for internal screens
- Integrates with Hilt and ViewModel with automatic args handling
Nibel lets Android teams write new features in Jetpack Compose while automatically handling compatibility with legacy fragment-based navigation.
About This Article
Android teams adopting Jetpack Compose in fragment-based apps struggle with navigation across three scenarios: fragment to compose, compose to compose, and compose to fragment. Each transition requires manual compatibility handling.
Pavlo Stavytskyi's team at Turo built Nibel, which uses Kotlin Symbol Processor (KSP) to generate type-safe navigation entries. Developers add @UiEntry annotations, and the tool handles fragment transactions and compose navigation automatically.
Nibel removes the need to write navigation boilerplate code. It works in single-module and multi-module setups without requiring direct dependencies between feature modules. Teams can build new Compose features while keeping their existing fragment code working.