KotlinConf’23 — Kotlin Multiplatform Conversions at Android Jetpack Scale by Dustin Lam and James Ward

Matthew Dolan
2 min readMay 22, 2023
Download slides

While Google have been busy updating Jetpack libraries with Kotlin Multiplatform support this talk by Dustin Lam and James Ward covers some of the technical challenges in delivering those while keeping compatibility.

This is no easy task especially when you consider compatibility isn’t just about the version of Android you are running against but also the language you are coding with. The talk highlighted some interesting issues Google faced with the JvmName annotation.

One of the other parts of the talk I found particularly interesting was focussed on testing.

Choosing an assertion framework is an important choice for the new Kotlin Multiplatform code. There are now a handful of multiplatform libraries to choose from, for example, Atrium, Kotest Assertions and Assert4K, however, as Googles stats show a lot of the tests within Jetpack libraries use Google Truth.

50,000+ usages of Google Truth

Instead of switching to one of the other libraries they made the decision to port Truth to Kotlin Multiplatform as (unofficially) “Kruth”. At the moment the code for Kruth is internal, although given Android and Jetpack is open source you can find the source code at testutils-kmp. I look forward to seeing Kruth released as an independent library, otherwise there is always the unofficial Truthish.

Of course one question that often comes up is what the future holds, and as expected Google likes to remain quiet. However, it was nice to hear about the possibility of Cashapp multiplatform-paging perhaps being merged upstream back into Jetpack. It’s important to note that even as an individual we can contribute to Jetpack given its open source nature.

You can find my thoughts on more KotlinConf’23 talks at KotlinConf’23. Please let me know your thoughts.

Join medium to read all of my articles or subscribe for e-mail updates.

--

--

Matthew Dolan

Matt Dolan has been eating doughnuts and developing with Android since the dark days of v1.6.