Simplifying Kotlin Multiplatform Setup with the New Android-KMP Plugin

Backer posted 1 min read

Simplifying Kotlin Multiplatform Setup with the New Android-KMP Plugin

Kotlin Multiplatform (KMP) has been evolving rapidly, and one of the
latest updates brings a huge quality-of-life improvement for Android
developers: a new Gradle plugin tailored specifically for KMP projects.

What changed?

Traditionally, when building Android libraries in a KMP setup, we used
the plugin:

plugins {
    id("com.android.library")
    kotlin("multiplatform")
}

This worked, but it wasn't optimized for multiplatform workflows.
Developers often faced issues like slow builds, confusing android {}
blocks, or having to manually adjust configurations.

Now, Google and JetBrains recommend switching to:

plugins {
    id("com.android.kotlin.multiplatform.library")
    kotlin("multiplatform")
}

Why it matters

  • Faster builds -- the new plugin is optimized for KMP projects.\
  • Cleaner configuration -- no more awkward android {} blocks.\
  • Better IDE integration -- Android Studio and IntelliJ IDEA
    understand the new plugin out of the box.\
  • Smarter defaults -- Android instrumented tests are disabled by
    default (no more empty test setups you don't need).

In short: your Gradle setup becomes leaner, and your workflow smoother.

Migration example

If you already have a KMP module configured with com.android.library,
just replace it with the new plugin:

Before:

plugins {
    id("com.android.library")
    kotlin("multiplatform")
}

After:

plugins {
    id("com.android.kotlin.multiplatform.library")
    kotlin("multiplatform")
}

That's it! No extra boilerplate, no breaking changes.

Final thoughts

This update may look small, but it's a big step toward making Kotlin
Multiplatform easier and more enjoyable for Android developers. If
you're starting a new KMP project, you should adopt the new plugin right
away. For existing projects, the migration is painless and gives you a
smoother development experience.


What do you think about this change? Have you already tried the new
plugin in your projects?

0 votes

More Posts

Kotlin Multiplatform + Compose: Unified Camera & Gallery Picker with Expect/Actual

Ismoy - Aug 20, 2025

BelZSpeedScan: A Kotlin Multiplatform Library for Fast Document Scanning

Ismoy - Aug 21, 2025

Type-safe Kotlin Multiplatform i18n: auto-convert Android strings to cross-platform translations.

Ismoy - Oct 14, 2025

A Kotlin library that simplifies setting and managing Android ringtones programmatically

Amjd Alhashede - Jul 15, 2025

ImagePickerKMP 1.0.23: Controling Camera Launch on iOS with directCameraLaunch

Ismoy - Sep 3, 2025
chevron_left

Related Jobs

View all jobs →

Commenters (This Week)

4 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!