X (formerly Twitter) Aug 9, 2025

One Codebase, Three Platforms: X's Experience with Kotlin Multiplatform

Article Summary

X (Twitter) rebuilt their encrypted DMs for millions of users with a team of just 5 Android engineers. Their secret? Kotlin Multiplatform.

Engineers from X share their real-world experience adopting KMP to rebuild direct messages as an end-to-end encrypted feature across Android, iOS, and Web. They moved from Circuit to Decompose while keeping native UI on each platform.

Key Takeaways

Critical Insight

KMP enabled a tiny team to ship encrypted messaging faster by writing core logic once, fixing bugs once, and maintaining consistent behavior across platforms.

The team reveals why dependency management between their legacy app and new codebase became their unexpected pain point.

About This Article

Problem

X's legacy Android app and new X Lite rewrite were in separate repositories, which created dependency conflicts. Upgrading Kotlin in one codebase meant upgrading it in the other, leading to messy transitive dependency issues.

Solution

The team decided to keep the codebases separate. They chose to prioritize speed in the new repository rather than try to align dependencies perfectly between both projects.

Impact

Keeping them separate let the team iterate faster on X Lite with KMP. The tradeoff was that they had to coordinate carefully whenever they updated shared dependencies like Kotlin.