Meta Jocelyn Luizzi, Jingbo Yang, Eve Matthaey

How Meta Translates Java to Kotlin at Scale

Original post Translating Java to Kotlin at Scale

Article Summary

Meta is rewriting 10 million lines of perfectly good Java code to Kotlin. Jocelyn Luizzi, Jingbo Yang, and Eve Matthaey reveal why they built custom infrastructure to automate what most companies would never attempt.

Meta has been translating its entire Android codebase from Java to Kotlin since going Kotlin-first in 2020. Rather than just writing new code in Kotlin like most companies, they're converting virtually everything, including some of the most complex files in one of the world's largest Android codebases. They're now past the halfway point.

Key Takeaways

Critical Insight

Meta automated Java to Kotlin translation at unprecedented scale by building custom tooling around JetBrains' J2K, converting over half their Android codebase with 200+ transformation steps.

Continue reading

The article reveals surprisingly tricky edge cases in seemingly simple transformations, like why nullable booleans and property initialization can silently break your code.

This page summarizes “Translating Java to Kotlin at Scale” by Meta, published Dec 18, 2024. All credit for the original work goes to the authors.

Read the original on engineering.fb.com (opens in new tab)

AI tools for Android

Browse all AI tools →