Kotlin 2.5.0-Beta1 Introduces Separate Compilation for Multiplatform Projects
New compilation approach improves consistency between compiler results and IDE analysis in Kotlin Multiplatform.
Kotlin 2.5.0-Beta1 adds an optional separate compilation mode for Kotlin Multiplatform that makes compiler results match what the IDE's analysis shows. Aligning the two gives a more reliable experience when working with common source sets.
However, the separate compilation feature is currently experimental and is disabled by default. Developers interested in exploring this feature will need to enable it manually. It's important to note that there are known issues related to the commonization of cinterops, which are still being addressed. For more details on these issues, refer to the Kotlin Blog.
Sources
- A More Reliable Compilation Scheme for Kotlin Multiplatform Modules Primary Kotlin Blog
Researched and drafted with AI assistance from the primary sources listed above, then checked against those sources before publication. Every factual claim here is traceable to a cited source; where the sources are silent, so are we. How this works.