github InsertKoinIO/koin 4.2.0-RC1

8 hours ago

Koin 4.2.0-RC1

This Release Candidate consolidates all features, improvements, and bug fixes from the alpha and beta series. The focus has been on Compose integration stability, scope resolution improvements, Ktor 3.4 DI Bridge, and compiler plugin support.

Highlights

Ktor 3.4 DI Bridge Integration

Navigation 3 Support

  • New koin-compose-navigation3 module for AndroidX Navigation3 1.0.0 - #2302 by @arnaudgiuliani
  • EntryProvider API for scoped dependency injection in navigation destinations
  • Metadata parameter passing support (animations, etc.) - 7fbab5e by @arnaudgiuliani
  • Make nav3 EntryProvider generic - #2314 by @xephosbot

Compose Improvements

ViewModelScope Updates

  • ⚠️ Breaking ⚠️: ViewModel declarations requiring scope injection must now be inside viewModelScope { } block
  • Improved CoreResolverV2 for proper child scope/ViewModel scope resolution - #2340 by @arnaudgiuliani

Koin Compiler Plugin Support API

New internal APIs for Koin Annotations compiler plugin:

Core Improvements

Bug Fixes

Dependencies

  • Kotlin 2.3.20-Beta1
  • Ktor 3.4.0
  • Coroutines 1.10.2
  • Compose Multiplatform 1.10.0
  • AndroidX Lifecycle 2.10.0 / JetBrains Lifecycle 2.9.6
  • AndroidX Navigation 2.9.6 / JetBrains Navigation 2.9.1
  • AndroidX Navigation3 1.0.0

New Modules

  • koin-compose-navigation3 - Navigation 3 integration
  • koin-annotations - Core annotations module
  • koin-dagger-bridge - Dagger to Koin bridge

Removed

Breaking ⚠️

  • ViewModel Scope Constructor Injection (still experimental) - ViewModel declarations requiring scope injection must now be declared inside viewModelScope { } block

Contributors

Thanks to all contributors: @arnaudgiuliani, @nhajratw, @egorikftp, @GrzegorzBobryk, @jvanderwee, @xephosbot, @nazaburo, @luozejiaqun

Full Changelog: 4.1.1...4.2.0-RC1

Don't miss a new koin release

NewReleases is sending notifications on new releases.