How Meta is Translating Its Java Codebase to Kotlin
Article Summary
Pascal Hartig from Meta sits down with the engineers tackling one of Android's biggest migration challenges: converting tens of millions of lines of Java to Kotlin. How do you pull off a transformation this massive without breaking everything?
Meta's Mobile Infra Codebases Team is systematically migrating their entire Android codebase from Java to Kotlin. In this Meta Tech Podcast episode, two engineers share the technical details of translating millions of lines of code while maintaining functionality and generating idiomatic Kotlin that works with Meta's internal frameworks.
Key Takeaways
- Meta is translating tens of millions of Java lines to Kotlin
- They open sourced kotlin_ast_tools for manipulating Kotlin code
- Team tackles nullability issues and generates framework specific idiomatic code
- Migration requires custom tooling beyond standard automated conversion
Meta is executing one of the largest Java to Kotlin migrations in the industry, building custom tooling to handle scale and framework complexity that standard converters can't address.
About This Article
Meta ran into unexpected problems when converting Java to Kotlin. Standard automated converters couldn't handle the complexity of their internal frameworks and massive codebase, so they needed to build custom solutions.
Pascal Hartig's team created custom tooling to solve the problem. They open-sourced kotlin_ast_tools, which lets them manipulate Kotlin code and generate code that fits Meta's internal framework requirements.
Meta's Mobile Infra Codebases Team documented their work in a Tech Podcast episode. They solved nullability issues and framework-specific code generation challenges that standard conversion tools couldn't handle at their scale.