Skip to content

Releases: InsertKoinIO/koin

4.2.0-RC1

02 Feb 08:17

Choose a tag to compare

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 view...
Read more

4.2.0-beta4

21 Jan 06:56

Choose a tag to compare

4.2.0-beta4 Pre-release
Pre-release

Koin 4.2.0-beta4

New Features

Ktor 3.4 DI Bridge Integration (#2294)

  • Added KoinDependencyMapExtension implementing Ktor 3.2+'s DependencyMapExtension interface (00496cc)
  • Bidirectional dependency resolution between Koin and Ktor DI:
    • Koin can resolve Ktor DI dependencies via KtorDIExtension
    • Ktor DI can resolve Koin dependencies via KoinDependencyMap
  • New KoinKtorApplication DSL for explicit bridging configuration options (53cfc64)
  • SPI registration for automatic extension discovery
  • New sample application demonstrating Koin + Ktor DI usage

Koin Plugin Support Improvements

  • Adjusted KoinApplication.withConfiguration() API support (c4a5dcb)
  • Enhanced ApplicationDSLExt with additional plugin/module DSL extensions
  • Added Koin instance extension methods for better integration support

Bug Fixes

  • Module flatten order error (#1999, #1998) - Fixed incorrect module flattening order that could cause dependency resolution issues
  • Fixed Qualifier conversion in Ktor DI bridge (90edf60)

Dependencies

  • Updated to Ktor 3.4.0-eap-1520 (75d4306)

Note: This release requires the Ktor EAP repository. Add the following to your settings.gradle.kts:
maven("https://maven.pkg.jetbrains.space/public/p/ktor/eap")

Full Changelog: 4.2.0-beta3...4.2.0-beta4

4.2.0-beta3

16 Jan 07:31

Choose a tag to compare

4.2.0-beta3 Pre-release
Pre-release

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

4.2.0-beta2

09 Dec 13:04

Choose a tag to compare

4.2.0-beta2 Pre-release
Pre-release

What's Changed

Full Changelog: 4.2.0-alpha3...4.2.0-beta2

4.2.0-alpha3

26 Nov 10:03

Choose a tag to compare

4.2.0-alpha3 Pre-release
Pre-release

What's Changed

Full Changelog: 4.2.0-alpha2...4.2.0-alpha3

4.2.0-alpha2

10 Nov 17:59

Choose a tag to compare

4.2.0-alpha2 Pre-release
Pre-release

What's Changed

Full Changelog: 4.2.0-alpha1...4.2.0-alpha2

4.2.0-alpha1

04 Nov 10:02

Choose a tag to compare

4.2.0-alpha1 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 4.1.1...4.2.0-alpha1

4.1.1

03 Sep 16:42

Choose a tag to compare

Koin 4.1.1 Changelog

🐛 Bug Fixes

  • Logger Constraint Revert - Reverted logger constraint due to compatibility issues causing errors across projects
  • Maven Central Publication - Fixed publication issues for Maven Central distribution

💥 Breaking Changes for Internal

  • Compose Scope Resolution - Fixed scope resolution issues in Compose integration with proper context handling, introduced ComposeContextWrapper to help manage internal scope state

🚀 Features & Improvements

  • Compose ViewModel Navigation - Added optional navGraphRoute parameter to sharedKoinViewModel for better navigation support
  • Compose Context Handling - Reworked LocalKoinApplication/LocalKoinScope with ContextWrapper to properly handle:
    • Scope closing lifecycle
    • Context restart scenarios
    • Better memory management

⚡ Performance & Core

  • Core Resolver Optimization - Avoid unnecessary flattening operations when dealing with single scope resolution
  • Scope Debugging - Enhanced scope debugging by showing linked scope IDs for better development experience
  • Library Updates - Updated underlying dependencies to latest stable versions

📚 Library Updates

  • Kotlin - Updated to 2.1.21 (from 2.1.20)
  • Binary Validator - Updated to 0.18.1 (from 0.16.3)
  • Ktor - Updated to 3.2.3 (from 3.1.3)
  • Jetbrains Compose - Updated to 1.8.2 (from 1.8.0)
  • AndroidX Libraries:
    • Fragment 1.8.9 (from 1.8.8)
    • WorkManager 2.10.3 (from 2.10.1)
    • Lifecycle 2.9.3 (from 2.9.0)
    • Navigation 2.9.3 (from 2.9.0)
    • JB Navigation RC01 (from Beta01)
  • Testing:
    • Robolectric 4.15.1 (from 4.14.1)
    • Benchmark 0.4.14 (from 0.4.13)
  • Build Tools - Added NMCP 1.1.0 for improved publication workflow

📦 Publication

  • Multi-platform Artifacts - Ensured all platform variants are properly published
  • Version Consistency - Synchronized all module versions across the ecosystem

🔧 Development

  • Test Coverage - Added ActivityScopeArchetypeTest for better scope lifecycle testing
  • API Stability - Maintained backward compatibility while fixing internal issues

👥 Contributors

https://github.com/arnaudgiuliani - Project Lead & Core Developer
https://github.com/rfaturriza - Community Contributor

New Contributors

Full Changelog: 4.1.0...4.1.1

4.1.0

06 Jun 15:42

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 4.0.4...4.1.0

4.1.0-RC1

16 May 15:40

Choose a tag to compare

4.1.0-RC1 Pre-release
Pre-release

Ktor EAP

This version is using Ktor EAP

maven("https://maven.pkg.jetbrains.space/public/p/ktor/eap") {
    mavenContent {
        includeGroupAndSubgroups("io.ktor")
    }
}

What's Changed

New Contributors

Full Changelog: 4.0.4...4.1.0-RC1