all speakers

Dustin Lam

Dustin Lam

Software Engineer @Google

Dustin is an engineer at Google, working on Android's Jetpack libraries, helping make app development easier and more accessible to everyone.

Kotlin Multiplatform Conversions at Android Jetpack Scale

This is a case study of how we converted several Jetpack libraries to Kotlin Multiplatform as part of our ongoing experimentation with the multiplatform technology.

Kotlin Multiplatform makes it possible to convert existing JVM specific code to be multiplatform. Doing so is mostly straightforward, but requires extra design considerations, between common and platform specific code. Further, doing so with an established Android library used by millions of existing apps, and utilizing JVM specific APIs as part of its public interfaces brings a whole new set of unique challenges.

We'll discuss techniques we've adopted for refactoring platform specific code to common code, highlighting some of the features of Kotlin Multiplatform including expect/actuals and hierarchical project structures.

We'll also cover some pitfalls, including missing multiplatform libraries, dealing with binary and source compatibility, and handling hard dependencies on JVM-specific code in your public interfaces.

Prior knowledge of Kotlin and Kotlin Multiplatform are recommended.