1.0.1
A maintenance release focused on Kotlin 2.4.0 support and Kotlin/Native + WASM/JS build reliability. One plugin artifact now spans Kotlin 2.3.20 β 2.4.x.
π Highlights
- Kotlin 2.4.0 support β the plugin no longer crashes on Kotlin 2.4.0, and the same artifact also works on Kotlin 2.3.20.
- iOS / Native / WASM builds fixed β annotation definitions no longer break KLIB serialization.
@Single(createdAtStart = true)honored on definition functions β eager singletons are created atstartKoinagain.
π Fixes
Kotlin version compatibility β #19, #42 (and koin#2431)
The plugin hard-crashed on the two most recent Kotlin versions:
- Kotlin 2.4.0 β
ClassCastExceptionduring FIR extension registration. - Kotlin 2.3.20 β
NoSuchMethodError(IrDeclarationOrigin.IR_EXTERNAL_DECLARATION_STUB).
1.0.1 introduces a Kotlin version-adapter layer: the core is compiled against the stable IR API, and a small per-version adapter (selected at compile time) absorbs the breaking compiler-internal differences. A single published jar supports Kotlin 2.3.20 and 2.4.0; an unrecognized newer Kotlin gets a warning and best-effort support, while versions below the floor get a clear, actionable error instead of an internal crash.
Duplicate injectedparams_* signatures broke iOS + WASM/JS β #44, #40
A type collected by more than one @ComponentScan module generated the @InjectedParam hint function twice with identical signatures. The JVM tolerated it; KLIB serialization (iOS/Native/WASM/JS) rejected it with "Different declarations with the same signatures". The hint is now emitted exactly once per target. (Regression vs 1.0.0-RC2.)
WASM/JS KLIB serialization β #40
The plugin's generated hint files lacked a resolvable source, failing the JS/WASM KLIB serializer ("No file found for source null"). Fixed β DSL-based projects now build on WASM/JS.
@Single(createdAtStart = true) silently dropped β koin#2425, koin#2415
createdAtStart = true on a @Single / @Singleton definition function inside a @Module was discarded in codegen, so eager singletons were never created at startKoin (no error or warning). Now propagated correctly. (The @Module(createdAtStart) and @Singleton class cases were already fixed in 1.0.0-RC3.13.)
β οΈ Known limitation β annotation-based WASM/JS on Kotlin 2.3.20
Annotation-based projects (@Module / @ComponentScan) targeting WASM/JS require Kotlin 2.4.0. On Kotlin 2.3.20 they hit an upstream Kotlin compiler bug β KT-82395 β in the JS/WASM KLIB metadata serializer, which the plugin cannot work around. Kotlin 2.4.0 resolves it. (iOS/Native and DSL-based WASM/JS are unaffected and work on both Kotlin versions.)
β Compatibility
| Kotlin 2.3.20 | Kotlin 2.4.0 | |
|---|---|---|
| JVM / Android | β | β |
| iOS / Native | β | β |
| WASM/JS β DSL | β | β |
| WASM/JS β annotations | β |
π¦ Install
plugins {
id("io.insert-koin.compiler.plugin") version "1.0.1"
}Full changelog: 1.0.0...1.0.1