Series Posts

· 3 min read Posted by Justin Mancinelli

Lions and Tigers and Bears! Clarifying Kotlin Multiplatform naming.

After Kotlin Multiplatform Mobile's Alpha announcement, there was confusion on how various pieces fit together. We clarify with a diagram.

If you recently learned of Kotlin Multiplatform Mobile from the Alpha announcement, there’s plenty of names to make sense of. 

For starters, there’s Kotlin Multiplatform or KMP, Kotlin/Native is also a thing, did we mention KMPP? or what about Kotlin Multiplatform Mobile or KMM described as an SDK plugin in the Alpha announcement? 

Lions, Tigers, Bears - The Wizard Of Oz GIF | Gfycat

After the KMM (sorry!) Alpha announcement, the Twittersphere had some confused faces with questions about how it all fits together. We decided to draw a diagram! In this post, we’ll clarify the confusion about nomenclature and answer frequently asked questions. Keep in mind, at Touchlab we focus on the native mobile part of the Kotlin Multiplatform equation, so we’ll prioritize there. Let’s jump in!

Kotlin Multiplatform naiming chart

Kotlin Multiplatform (or the KMP shorthand) is a capability of the Kotlin language that lets you produce shared code for JS, native apps – iOS, Android, desktops, embedded, as well as the more familiar JVM implementation. KMP sits at the top as the category describing using Kotlin to target different end states while sharing code between them. Initially, when developers heard about KMP and looked at the associated multiplatform docs, there was confusion. Why? Because those docs listed out all the targets that KMP supports and associated configurations. It’s overwhelming for both a new and seasoned developer. KMP is a big category. Some teams like Quizlet really care about Kotlin JS and Kotlin Multiplatform Mobile because they have a big web and mobile presence. Other teams like PlanGrid really pay attention to Desktop because their users (construction workers and managers) rely on desktop. KMP is a diverse ecosystem as the diagram layouts.

The Multiplatform Gradle plugin, which is necessary for any multiplatform development you’re doing, sits to the right. 

Kotlin/Native is a subset of Kotlin Multiplatform; it’s the compiler for Kotlin that outputs native code for different system architectures. Beneath Kotlin/Native we’ve listed some (there are many more) of the target architecture outputs of different CPUs that the compiler supports. Kotlin/JS has a separate path and doesn’t go through the Kotlin/Native compiler. Kotlin JVM which is what everyone on Android uses also has a separate path and doesn’t go through the Kotlin/Native compiler. Right now, WebAssembly is going through the Kotin/Native compiler, but they’re restructuring it to have its own compiler. Eventually, WebAssembly will be taken out of Kotlin/Native. 

Let’s turn to Kotlin Multiplatform Mobile or KMM, which we define as Kotlin Multiplatform for mobile development. The Alpha announcement was a branding exercise to demonstrate KMP for mobile development is maturing and an important focus area. The announcement didn’t get rid of anything else, didn’t change other things, and didn’t change anything drastically in mobile. To that end, we’ve listed the Cocoapods Integration and the Android Studio plugin as examples of additional JetBrains tooling to support mobile development with Kotlin Multiplatform. 

If you’re new to Kotlin Multiplatform and want to get started with KMM, here’s a list of useful resources by Touchlab:

Explore: “Kotlin Multiplatform Mobile (KMM)” book – 40+ pages of technical insights for devs and managers interested in piloting KMM

Compare: Not sure about KMM? Want to see how it stacks up against React Native or Flutter – Webinar – The case for KMM

Pilot: Get started fast with KMM – KaMP Kit, a collection of code and tools designed to get KMM running on Android and iOS quickly

Pilot: Get started fast with KMM for iOS Developers starter project