KMM vs. KMP — What’s the Deal?

Kotlin Multiplatform goes mobile

Kris Wong
VMware 360
3 min readJan 22, 2021

--

Photo by Alexandru Acea on Unsplash

Before I begin, allow me to point out that I do not work for JetBrains, and while I do have contacts at the company, this post represents my understanding of the situation regarding these two separate, but strongly coupled efforts. This post also reflects my views as an individual practitioner and is not a formal VMware endorsement of any product or service.

Not long ago, JetBrains announced the availability of Kotlin Multiplatform Mobile (KMM), an offshoot of Kotlin Multiplatform (KMP) with its own team focused on mobile use cases. If you have not read the announcement, I recommend that you do. This announcement, along with the introduction of the KMM plugin for Android Studio, has led to some confusion within the community. JetBrains hasn’t specifically addressed this confusion head-on. That’s mainly because the company still seems to be hammering out its strategy in this area. It is still learning how the community is using, and desires to use, its products to most effectively tackle Multiplatform use cases. With this in mind, I’d like to attempt to shed light on two separate questions:

  • What is the difference between KMM and KMP?
  • What IDE/plugin should I be using for my multiplatform development?

KMM and KMP are not separate projects or technologies. KMM can be thought of as a subset of KMP. While KMM has its own focused team within JetBrains (and its own website), it is built from the same codebase as KMP. As a developer, you do not choose (or migrate) between the two. You are either targeting mobile platforms, or you’re not.

Given this, there is no right or wrong answer in terms of which IDE (IDEA or Android Studio) you should be using for your development. It is still a little unclear how the roadmaps for the KMP plugin for IDEA, and the KMM plugin for Android Studio, will evolve. That being said, I recommend that if your project is targeting Android, that you use Android Studio for your development. Android Studio will provide you with the best experience in developing for this platform. In fact, at this time, it’s not even possible to use the latest Android dev tools with IDEA. Additionally, if we can cut one IDE out of the mix, we may as well do so. As a bonus, the KMM plugin introduced the ability to run and debug on iOS devices from within Android Studio, which can be a big convenience. If you have web (JS) or desktop targets in your project, IDEA may be a better choice. You can even switch back and forth between the two if you find that useful. Ultimately, the choice is yours.

In summary, the mobile use case is so core to Kotlin Multiplatform, that JetBrains decided to create a team specifically to focus on it. While you can continue to use IDEA to develop your KMP projects if you want, you will find the best experience within Android Studio when targeting Android and iOS.

--

--

Kris Wong
VMware 360

Software engineer+architect. Entrepreneur. Real estate investor.