Atlassian Vishnu Rajeevan Jan 30, 2018

Kotlin at Trello: Mobile Development Best Practices

Article Summary

Vishnu Rajeevan from Trello shares how his team went from 0% to 30.8% Kotlin in just over a year. Their strategy? Start with tests, then make every new feature Kotlin-only.

Trello's Android team adopted Kotlin in October 2016, right after version 1.0.4 launched. This post documents their journey from cautious experimentation to full commitment, including the team mandate that drove adoption: all new features in Kotlin, and any old feature updates must be converted first.

Key Takeaways

Critical Insight

Trello successfully scaled Kotlin adoption to nearly one-third of their codebase by starting small with tests, then enforcing Kotlin-first rules for all new work.

The article reveals specific commit log patterns that show how the team actually executed their Kotlinization strategy day-to-day.

About This Article

Problem

Trello's Android team worried about how fast the Kotlin compiler would run and whether the language was ready for production. When version 1.2.0 came out, bugs in the standard library showed up within a day.

Solution

Vishnu Rajeevan's team started by writing tests in Kotlin to see if it would work for them before using it in actual features. After that worked out, they made a rule that any updates to old features had to be rewritten in Kotlin before the team could move forward.

Impact

Compilation times got much faster once they switched to Kotlin, and Kapt stopped slowing down their builds. This let them feel confident enough to use Kotlin everywhere in their workflow, including tests, new features, and updates.