Meta: From zero to 10 million lines of Kotlin
Original post From zero to 10 million lines of Kotlin
Article Summary
Omer Strulovich from Meta shares how they migrated 10 million lines of Android code from Java to Kotlin. The scale is massive, but the real story is in how they automated the impossible parts.
Meta converted their entire Android codebase (Facebook, Instagram, Messenger, Portal, Quest) from Java to Kotlin. This wasn't just running a converter tool: they built a three-step pipeline called Kotlinator to handle edge cases, framework quirks, and automated refactoring at scale.
Key Takeaways
- Built Kotlinator pipeline: pre-process, run J2K converter, then auto-fix common issues
- Code reduced by 11% on average, some files cut in half
- Performance stayed identical, but build times increased significantly
- Open sourced Ktfmt formatter and Kotlin AST manipulation utilities
Meta successfully migrated over 10 million lines to Kotlin while maintaining performance, reducing code by 11%, and building automation tools they're now open sourcing.
Continue reading
This page summarizes “From zero to 10 million lines of Kotlin” by Meta, published Oct 24, 2022. All credit for the original work goes to the authors.