<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/a-more-reliable-compilation-scheme-for-kotlin-multiplatform-modules-jymr9ynsj" -->

---
title: A More Reliable Compilation Scheme for Kotlin...
description: JetBrains introduces an experimental 'separate compilation' scheme for Kotlin Multiplatform (KMP) projects, available starting with Kotlin 2.5.0-Beta1. It...
canonical: https://daily.dev/posts/a-more-reliable-compilation-scheme-for-kotlin-multiplatform-modules-jymr9ynsj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: A More Reliable Compilation Scheme for Kotlin Multiplatform Modules | daily.dev
og:description: JetBrains introduces an experimental 'separate compilation' scheme for Kotlin Multiplatform (KMP) projects, available starting with Kotlin 2.5.0-Beta1. It...
og:url: https://daily.dev/posts/a-more-reliable-compilation-scheme-for-kotlin-multiplatform-modules-jymr9ynsj
og:image: https://api.daily.dev/og/posts/jyMr9ynsj.png
og:image:alt: A More Reliable Compilation Scheme for Kotlin Multiplatform Modules
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# A More Reliable Compilation Scheme for Kotlin Multiplatform Modules

**[JetBrains](https://daily.dev/sources/jetbrains)** · 8 min read · 2 upvotes · 0 comments

## Summary

JetBrains introduces an experimental 'separate compilation' scheme for Kotlin Multiplatform (KMP) projects, available starting with Kotlin 2.5.0-Beta1. It fixes inconsistencies where IntelliJ IDEA's analysis disagreed with the actual compiler behavior around overload resolution, type inference, and commonMain code accidentally resolving to platform-specific declarations. Enabling it via the kotlin.kmp.separateCompilation=true Gradle property makes common source sets compile strictly against metadata KLIBs rather than platform artifacts, matching IDE behavior and enabling incremental compilation for common source sets. The feature is experimental, disabled by default, and has known issues including cinterop commonization problems and no effect on single-target KMP modules.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.jetbrains.com/kotlin/2026/09/a-more-reliable-compilation-scheme-for-kotlin-multiplatform-modules>

## Questions this post answers

### How do I enable separate compilation for Kotlin Multiplatform projects?

Add kotlin.kmp.separateCompilation=true to the gradle.properties file. This experimental, opt-in feature was introduced in Kotlin 2.5.0-Beta1 and makes commonMain code resolve strictly against metadata KLIB declarations instead of platform artifacts, matching IntelliJ IDEA's existing analysis behavior and enabling incremental compilation for common source sets.

_daily.dev keeps developers tracking experimental Kotlin Multiplatform compiler flags like this one up to date._

### Why does my Kotlin Multiplatform commonMain code compile fine even though IntelliJ IDEA shows an unresolved reference error?

By default, KMP compiles commonMain code against platform artifacts (like jvmMain jars), so it can implicitly resolve declarations only present on that platform, even though IntelliJ IDEA's analysis correctly treats commonMain as restricted to metadata KLIB declarations. This mismatch causes IDE-reported unresolved references that still compile successfully. Enabling kotlin.kmp.separateCompilation=true resolves the discrepancy by compiling commonMain strictly against metadata KLIBs.

_Developers debugging IDE versus compiler mismatches in Kotlin Multiplatform can follow fixes like this on daily.dev._

### What are the known limitations of Kotlin Multiplatform separate compilation?

Separate compilation has unresolved issues with commonization of cinterops (tracked as KT-88178 and KT-41509), so it should be enabled cautiously in projects using C interoperability. It also has no effect on KMP modules with common source sets and only a single declared target, plus various smaller bugs such as KT-88148. Library authors must publish metadata KLIBs for it to work correctly.

_daily.dev helps teams weighing experimental Kotlin Multiplatform features stay ahead of edge cases like these._

## Similar posts on daily.dev

- [A New Default Project Structure for Kotlin Multiplatform](https://daily.dev/posts/a-new-default-project-structure-for-kotlin-multiplatform-uwzzahmvv) · JetBrains · 2 upvotes · 0 comments
- [Kotlin Multiplatform Is Not Cross-Platform: Understanding the Real Difference](https://daily.dev/posts/kotlin-multiplatform-is-not-cross-platform-understanding-the-real-difference-feksv6re1) · Medium · 0 upvotes · 0 comments
- [Why we love multiplatform with Kotlin and Compose](https://daily.dev/posts/why-we-love-multiplatform-with-kotlin-and-compose-ygw5twyaa) · Q42 Engineering · 0 upvotes · 0 comments
- [Kotlin 2.3.20 harmonizes with C, JavaScript/Typescript](https://daily.dev/posts/kotlin-2-3-20-harmonizes-with-c-javascript-typescript-hddvbwasn) · InfoWorld · 4 upvotes · 0 comments
- [Start Your Next KMP App With Kotlin Toolchain 0.13](https://daily.dev/posts/start-your-next-kmp-app-with-kotlin-toolchain-0-13-c60phqfjs) · Kotlin · 5 upvotes · 0 comments

---

Tags: [#devtools](https://daily.dev/tags/devtools), [#kotlin](https://daily.dev/tags/kotlin), [#gradle](https://daily.dev/tags/gradle)

[View this post on daily.dev](https://daily.dev/posts/a-more-reliable-compilation-scheme-for-kotlin-multiplatform-modules-jymr9ynsj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"A More Reliable Compilation Scheme for Kotlin Multiplatform Modules","url":"https://daily.dev/posts/a-more-reliable-compilation-scheme-for-kotlin-multiplatform-modules-jymr9ynsj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/a-more-reliable-compilation-scheme-for-kotlin-multiplatform-modules-jymr9ynsj"},"datePublished":"2026-09-28T10:59:28.303Z","dateModified":"2026-09-28T10:59:51.597Z","description":"JetBrains introduces an experimental 'separate compilation' scheme for Kotlin Multiplatform (KMP) projects, available starting with Kotlin 2.5.0-Beta1. It...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/034846a2daa1e8fcf1ed36f0130c94cb?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/034846a2daa1e8fcf1ed36f0130c94cb?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"JetBrains","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"JetBrains","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/53ecf0c676f34b3896ee109609d91efa","url":"https://daily.dev/sources/jetbrains"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/a-more-reliable-compilation-scheme-for-kotlin-multiplatform-modules-jymr9ynsj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"devtools,kotlin,gradle","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"JetBrains","item":"https://daily.dev/sources/jetbrains"},{"@type":"ListItem","position":3,"name":"A More Reliable Compilation Scheme for Kotlin Multiplatform Modules"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/a-more-reliable-compilation-scheme-for-kotlin-multiplatform-modules-jymr9ynsj#faq","mainEntity":[{"@type":"Question","name":"How do I enable separate compilation for Kotlin Multiplatform projects?","acceptedAnswer":{"@type":"Answer","text":"Add kotlin.kmp.separateCompilation=true to the gradle.properties file. This experimental, opt-in feature was introduced in Kotlin 2.5.0-Beta1 and makes commonMain code resolve strictly against metadata KLIB declarations instead of platform artifacts, matching IntelliJ IDEA's existing analysis behavior and enabling incremental compilation for common source sets. daily.dev keeps developers tracking experimental Kotlin Multiplatform compiler flags like this one up to date."}},{"@type":"Question","name":"Why does my Kotlin Multiplatform commonMain code compile fine even though IntelliJ IDEA shows an unresolved reference error?","acceptedAnswer":{"@type":"Answer","text":"By default, KMP compiles commonMain code against platform artifacts (like jvmMain jars), so it can implicitly resolve declarations only present on that platform, even though IntelliJ IDEA's analysis correctly treats commonMain as restricted to metadata KLIB declarations. This mismatch causes IDE-reported unresolved references that still compile successfully. Enabling kotlin.kmp.separateCompilation=true resolves the discrepancy by compiling commonMain strictly against metadata KLIBs. Developers debugging IDE versus compiler mismatches in Kotlin Multiplatform can follow fixes like this on daily.dev."}},{"@type":"Question","name":"What are the known limitations of Kotlin Multiplatform separate compilation?","acceptedAnswer":{"@type":"Answer","text":"Separate compilation has unresolved issues with commonization of cinterops (tracked as KT-88178 and KT-41509), so it should be enabled cautiously in projects using C interoperability. It also has no effect on KMP modules with common source sets and only a single declared target, plus various smaller bugs such as KT-88148. Library authors must publish metadata KLIBs for it to work correctly. daily.dev helps teams weighing experimental Kotlin Multiplatform features stay ahead of edge cases like these."}}]}
```

