Skip to content

1.0.0-RC2

Pre-release
Pre-release

Choose a tag to compare

@arnaudgiuliani arnaudgiuliani released this 22 Apr 09:50
· 126 commits to main since this release

Koin Compiler Plugin 1.0.0-RC2

Stability pass on top of RC1: fixes user-reported crashes on iOS/Native, multi-module dex-merge collisions, and a module load-order behaviour change that makes app-level overrides actually win.

Requires: Kotlin 2.3.x+ (K2) | Koin 4.2.1+


What's New Since 1.0.0-RC1

Cross-module visibility

  • @Module + @ComponentScan without @Configuration now emits cross-module scan hints — previously scan-covered definitions were invisible to downstream compileSafety unless the module was also @Configuration. See PR #25.
  • @Single(binds = [...]) on @Module provider functions preserves binding metadata across module boundaries — consumers can now resolve interfaces bound via provider functions in a dependency JAR. See PR #23 / #22.

Fixes

  • Module load order (koin#2402) — auto-discovered @Configuration modules now load first and explicit @KoinApplication(modules = [...]) load last, so app-level overrides win over dependency defaults under Koin's last-wins semantics.
  • Duplicate call-site hint classes in multi-module Android builds (#20) — hint filenames are now prefixed with the compilation module identifier; no more org.koin.plugin.hints.XxxCallsiteKt collisions at dex merge.
  • Generic DSL types on iOS/Native (#18) — Kotlin/Native klib signature mangler no longer crashes on generic DSL types (single<Navigator<Key>>()). Hint emission erases type arguments to match runtime Koin's erasure behaviour.
  • Arrow Raise.bind() / ktor resourceScope { bind() } crash (#17) — collectBindType now matches Koin's bind by FqName, no longer intercepting unrelated library bind functions.
  • single<T> { create(::Impl) } with interface type parameter — the outer <T> is now registered as the provided type (previously Impl), so koin.get<Interface>() compile-safety passes as expected.
  • Missing DSL-artifact error (RC2.3) — @KoinViewModel / @KoinWorker without their runtime artifact (koin-core-viewmodel / koin-android-workmanager) now fails the build with a clear message pointing at the missing dependency, instead of silently producing a broken definition.
  • Unit-returning top-level @Singleton functions (RC2.2) — klib signature-clash fix; two qualified side-effect initializers no longer collide on iOS/JS/Wasm.
  • Custom qualifier annotations (RC2.1) — plain custom @Qualifier annotations now produce TypeQualifier, matching runtime named<T>() / typeQualifier<T>() semantics.

Documentation

Extended docs on module load order, generic DSL types (with the named<T>() qualifier pattern used by koin-compose-navigation3), and troubleshooting the new missing-artifact compile error.


Behaviour change to note when upgrading

Module load order: if your app declares @KoinApplication(modules = [AppModule::class]) and AppModule defines a binding that is also defined in a @Configuration-discovered dependency module, the app's binding now wins (previously, the dep overrode the app). This is the documented last-wins semantic applied correctly — but if you were relying on the previous behaviour, reorder via an explicit modules = [Dep::class, AppModule::class] list to control load order precisely.


Contributors

Code contributions this release:

Ongoing contributors (carried over from RC1):

  • Arnaud Giuliani — project lead
  • @JellyBrick — caching optimisations (PR #5), Gradle release signing fix
  • Kevin Chiu — Gradle plugin package fix
  • Youssef Shoaib — runtime annotations provider, build improvements

Issue reporters — the reproductions were excellent, thank you:

And Francois Dabonot (Kotzilla Slack), whose migration feedback drove the missing-artifact compile error introduced in RC2.3.


Full changelog