AnkiDroid successfully converted its entire project from Java to Kotlin. In this first AnkiDroid dev blog post, we’ll explain our goal, our methods, and what remains to do.
The main goal of the migration is to improve developers' experience. Kotlin code is easier to read, write and review than Java. Anki AnkiDroid is 13 years old. If we are still here in 13 years, we hope that the time spent during this migration year will be entirely saved. We also hopefully will decrease the number of bugs and get more readable codes using Kotlin features, such as better nullability check, scope function, and high-order function over collections.
Here is the extra goals we discovered along the way:
- git history should still allow us to track the origin of each code line.
- Each commit should compile
- New contributors should be able to help us easily
- Kotlin migration should not introduce bug