Meta

Translating Java to Kotlin at Scale

Dec 18, 2024Jocelyn Luizzi, Jingbo Yang, Eve Matthaey
Translating Java to Kotlin at Scale
SummaryAI, from the source post

This post details Meta's multi-year effort to migrate its Android codebase from Java to Kotlin. It describes the development of an automated translation tool called the Kotlinator, which comprises six phases: deep build, preprocessing, headless J2K, postprocessing, linters, and build error-based fixes. The post highlights the challenges of automating this process at scale, the custom tooling developed to handle framework-specific changes and nullability, and the collaboration with JetBrains to improve the J2K tool for future compatibility with the K2 compiler.

More from the Facebook Engineering Blog trail