Facebook Engineering Blog
Translating Java to Kotlin at Scale

Translating Java to Kotlin at Scale

12/18/2024 · Jocelyn Luizzi, Jingbo Yang, Eve Matthaey

What this post added

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.

Read the original post ↗