Kotlin 2.4.0 ships Swift package support and Java 26

Kotlin 2.4.0 adds Swift package dependencies for Native, Java 26 for JVM, and WebAssembly Component Model. Multiplatform teams can consume Swift libraries directly and target newer Java. Upgrade via IntelliJ IDEA, Android Studio, or Gradle.
Why it matters
Kotlin 2.4.0 removes several friction points for teams shipping multiplatform code. Swift package support in Kotlin/Native means you can pull Apple ecosystem dependencies directly instead of maintaining bridging wrappers or CocoaPods workarounds. Java 26 support on the JVM target lets server-side and Android projects adopt newer JDKs without waiting for a compiler update. For WebAssembly builds, incremental compilation is now on by default and the Component Model is supported, which tightens the feedback loop for Wasm targets. Gradle 9.5.0 compatibility and automatic Java/JVM target alignment in Maven reduce build configuration toil. These are not experimental flags; they are defaults or stable features you can use in production today.
What changed
The language stabilizes context parameters and explicit backing fields, which cleans up APIs that need to pass implicit contexts or expose property internals safely. The standard library graduates the UUID API to stable and adds sorted-order checks. On Kotlin/JVM, annotations in metadata are enabled by default and Java 26 is fully supported. Kotlin/Native now imports Swift packages as dependencies, exports Swift more reliably, and switches to the CMS garbage collector by default. Kotlin/Wasm enables incremental compilation by default and supports the WebAssembly Component Model. Kotlin/JS gains value class export and ES2015 features during JS code inlining. The compiler also fixes inconsistent inline function behavior during klib compilation, which should reduce mysterious build cache misses.
What to watch
If you maintain a Kotlin Multiplatform library, test the Swift package integration on Apple targets before your next release. Android and backend teams should verify Java 26 compatibility in CI and check that metadata annotations do not bloat artifact sizes. Wasm projects should validate bundle changes after incremental compilation is enabled. Gradle users on older wrappers should plan a toolchain bump to 9.5.0 to stay on the supported path. Review the full compatibility guide before upgrading production builds.
Interview question
What is the main benefit of Swift package support in Kotlin/Native for multiplatform teams?
- a.It removes the requirement for a macOS host when building Apple-targeted Kotlin code.
- b.It forces migration from CocoaPods to Swift Package Manager for all iOS dependencies.
- c.It lets teams consume Apple ecosystem dependencies directly instead of maintaining bridging wrappers or CocoaPods workarounds.Correct
- d.It automatically exports every Kotlin public API to Swift without requiring annotations.
Why? this is the answer
The card states that Swift package support allows pulling Apple dependencies directly, eliminating the need for bridging wrappers or CocoaPods workarounds. Option B is tempting because it mentions CocoaPods, but the feature provides an alternative rather than forcing a migration.
Just read this? Test yourself on what you have been reading.
Read the original → blog.jetbrains.com
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on kotlin — each one lists the topics its interview covers.
See open roles