Meta Feb 25, 2025

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

Critical Insight

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.

The podcast reveals unexpected difficulties the team encountered that you won't find in typical migration guides.

About This Article

Problem

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.

Solution

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.

Impact

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.

Recent from Meta

Related Articles