github InsertKoinIO/koin 4.2.0-beta3

pre-release12 hours ago

4.2.0-beta3

⚠️ ViewModelScope Declaration Requirement Updated

Experimental Feature: The automatic scope creation for ViewModel constructor injection now requires ViewModel declarations to be part of the viewModelScope section. If declared outside, injection will look in the root scope instead of the ViewModel scope, causing resolution failures.

  // Injection against root scope
  viewModel { MyViewModel(get()) }

  // Injection against viewModel scope
  viewModelScope {
      viewModel { MyViewModel(get()) }
  }

Koin Compiler Plugin Support API

New Plugin Support API for Koin Annotations compiler plugin integration:

  • ModuleExt - Module extensions for plugin-generated code
  • CreateDSL - DSL for plugin code generation
  • BaseDSLExt - Base DSL extensions
  • ApplicationDSLExt - Application-level DSL extensions
  • ViewModelDSLExt / ViewModelModuleExt - ViewModel support for plugin
  • WorkerDSLExt / WorkerModuleExt - Android Worker support for plugin

Bug Fixes

Features & Improvements

Libraries & Dependencies

  • Kotlin 2.3.20-Beta1
  • 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
  • Ktor 3.3.3

Other

New Contributors

Full Changelog: 4.2.0-beta2...4.2.0-beta3

Don't miss a new koin release

NewReleases is sending notifications on new releases.