Skip to content
CAI
Software that uses CAICheck a score

InsertKoinIO/koin

68.6

Adequate · 13 November 2026

20.5k

lines of production code

Kotlin

primary language

6

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Android performance benchmark UI

A new MainActivity is introduced in the android-perfs example to display the results of performance benchmarks. The activity shows start time, execution time, and worst-case metrics, and visually indicates test success or failure by coloring the text green or red.

android-perfs · high confidence

Add Android performance benchmark application

The \examples/android-perfs\ directory now includes a complete Android application structure, featuring the \AndroidManifest.xml\, \MainApplication\ class, and UI layouts for \MainActivity\ and \MvpActivity\. This app serves as a performance benchmark runner that executes Koin dependency injection modules (specifically \perfModule400\) and displays completion status, providing a concrete example of how to measure and validate Koin's performance characteristics on Android devices.

examples/android-perfs/src/main · high confidence

Add AndroidX Startup integration for Koin initialization

The \koin-androidx-startup\ module now provides a \KoinInitializer\ that integrates Koin with AndroidX Startup, allowing Koin to be initialized automatically via the \androidx.startup.InitializationProvider\. This change introduces the \KoinStartup\ interface, which users must implement in their Application class to provide their Koin configuration via the \onKoinStartup()\ function. The \KoinInitializer\ and \KoinStartup\ are marked with \@KoinExperimentalAPI\, indicating this integration is experimental. The AndroidManifest.xml is updated to register the \KoinInitializer\ as a content provider for the startup process.

projects/android/koin-androidx-startup · high confidence

Add Fragment extension for Navigation-graph-scoped ViewModels

Introduces a new \koinNavGraphViewModel\ extension function for Android Fragments, allowing ViewModels to be scoped to a specific Navigation graph ID. This enables developers to retrieve ViewModels that are tied to the lifecycle of a particular navigation destination rather than the entire activity or application, improving state management within complex navigation hierarchies.

projects/android/koin-androidx-navigation · high confidence

Add JVM performance benchmark suite for Koin module initialization and flattening

A new JVM-based benchmark example has been added to the \examples/jvm-perfs\ directory to measure Koin's startup and module-handling performance. The suite uses JMH to benchmark scenarios including empty Koin application starts, initializing a module with 400 dependencies, injecting those dependencies, and comparing recursive versus iterative approaches for flattening nested module graphs. A shell script (\benchmark.sh\) is provided to run these benchmarks via Gradle, and a sample output file (\benchmark.txt\) illustrates the expected performance metrics for these operations.

examples/jvm-perfs · high confidence

Add Koin Compiler Plugin stubs and support APIs

This change introduces a set of stub functions and support APIs in the Koin core library to enable the new Koin Compiler Plugin. It adds a \KoinConfigurationHint\ annotation for cross-module discovery of \@Configuration\ modules, and provides DSL extension functions (such as \startKoin\<T\>()\, \koinApplication\<T\>()\, \withConfiguration\<T\>()\, and \modules\<T\>()\) that act as compile-time hooks. When the compiler plugin is not present, these stubs throw a \NotImplementedError\ directing users to install the plugin. Additionally, it includes non-reified builder functions (like \buildSingle\, \buildFactory\, \buildScoped\) and \Scope.create\ stubs that the compiler plugin will transform into actual dependency definitions, allowing for type-safe module injection and configuration without runtime reflection overhead.

projects/core/koin-core/src/commonMain/kotlin/org/koin/plugin · high confidence

Add Koin DSL and Compose integration for Navigation 3

This change introduces the integration layer for AndroidX Navigation 3, allowing developers to define navigation routes directly within Koin modules. It adds \Module.navigation\ and \ScopeDSL.navigation\ DSL functions to register composable destinations as singletons or scoped entries, supporting optional metadata. On the UI side, it provides \koinEntryProvider\ and Android-specific \ComponentCallbacks\ extensions to aggregate these registered installers into a type-safe \EntryProvider\ that feeds the Navigation 3 host.

projects/compose/koin-compose-navigation3 · high confidence

Add Koin and Ktor DI integration sample

A new sample application in examples/ktor-di-sample demonstrates integrating Koin with Ktor's built-in dependency injection. The sample defines routes for resolving services exclusively from Koin, exclusively from Ktor DI, and mixed scenarios where both containers are bridged, along with corresponding tests to verify the endpoints.

examples/ktor-di-sample · high confidence

Add Koin configuration and module verification for Android examples

The Android samples now include a Koin configuration file (koin.properties) that sets the application title to "Android Samples Demo", and the coffee-maker example includes a shell script (check\_modules.sh) to verify module integrity via Gradle.

examples/androidx-samples/src/main/assets, examples/coffee-maker · high confidence

Add Koin core support for the wasmJs target

This change introduces the necessary implementation files to enable Koin on the WebAssembly JavaScript (wasmJs) platform. Specifically, it adds a \GlobalContext\ object to manage the global Koin application instance and a \PrintLogger\ class for standard output logging, allowing users to initialize and use dependency injection in wasmJs environments.

projects/core/koin-core/src/wasmJsMain/kotlin/org/koin/core · high confidence

Add Ktor 3 example application with request-scoped components

The hello-ktor example has been updated to demonstrate Ktor 3 integration, featuring a modular setup with distinct application modules and request-scoped dependencies. Users can now see how to define Koin modules using the new \koinModule\ DSL, inject services within Ktor routing nodes, and manage request-scoped components (such as \ScopeComponent\) tied to the \ApplicationCall\. The example also includes configuration for Koin lifecycle monitoring and demonstrates binding implementations to interfaces within the dependency graph.

examples/hello-ktor · high confidence

Add Ktor-based multi-module example application

The examples/multimodule-ktor location now includes a complete Ktor server application demonstrating multi-module dependency injection with Koin. This includes the main application entry point that configures Koin, registers services from module\_a and module\_b, and exposes REST endpoints (/all, /all/only-a, /all/only-b) to retrieve service responses. A corresponding test suite validates these endpoints, and a shared IService interface defines the contract for the modules.

examples/multimodule-ktor · high confidence

Add Ktor-based multi-module example with Koin integration

The examples/multimodule-ktor directory now includes module-a and module-b, each providing a Koin module that registers a service implementing IService and exposing a corresponding HTTP endpoint (/module-a and /module-b) via Ktor routing.

examples/multimodule-ktor/module-a, examples/multimodule-ktor/module-b · high confidence

Add SLF4J logger integration for Koin

This change introduces a new SLF4J-based logger implementation for Koin, allowing users to route Koin's internal logging messages to the SLF4J framework. The update includes the \SLF4JLogger\ class, which maps Koin's log levels (DEBUG, INFO, ERROR, WARNING) to corresponding SLF4J methods, and an extension function \slf4jLogger\ on \KoinApplication\ to easily enable this logger with a configurable default level.

projects/ktor/koin-logger-slf4j · high confidence

Add ViewModel DSL extensions for Koin modules and scopes

New DSL functions are added to the Koin core-viewmodel module, enabling developers to declare Android ViewModels directly within Koin module and scope definitions. The changes introduce \Module.viewModel\ and \ScopeDSL.viewModel\ for basic declaration, along with \Module.viewModelOf\ and \ScopeDSL.viewModelOf\ which allow constructor references to be resolved at compile time without reflection. These extensions support ViewModels with up to 19 constructor parameters, simplifying dependency injection for Android components.

projects/core/koin-core-viewmodel/src/commonMain/kotlin/org/koin/core · high confidence

Add WebAssembly (Wasm) platform support for Koin core

New platform-specific implementations have been added for the wasmJs target, enabling Koin to function on WebAssembly. This includes concrete definitions for platform tools such as ID generation (using Kotlin's experimental Uuid API), stack trace retrieval, class name resolution, and thread-local storage (via Stately's ThreadLocalRef). These changes provide the necessary infrastructure for Koin's core dependency injection features to operate correctly on Wasm-based applications.

projects/core/koin-core/src/wasmJsMain/kotlin/org/koin/mp · high confidence

Add coffee-maker example app using Koin DSL

The coffee-maker example application has been added to the examples directory, demonstrating how to use Koin's dependency injection. The app defines a simple coffee-making system with interfaces for Heater and Pump, and implementations like ElectricHeater and Thermosiphon. It uses the new Koin DSL syntax (singleOf, bind) to wire these components together in a module, and includes a main entry point that starts Koin, injects the CoffeeMaker, and measures the time taken to brew coffee.

examples/coffee-maker/src/main · high confidence

Add core Koin error exception classes

The \org.koin.core.error\ package now includes a comprehensive set of exception classes to handle specific error conditions during dependency injection. New exceptions include \ClosedScopeException\, \DefinitionOverrideException\, \DefinitionParameterException\, \InstanceCreationException\, \KoinApplicationAlreadyStartedException\, \MissingPropertyException\, \MissingScopeValueException\, \NoDefinitionFoundException\, \NoParameterFoundException\, \NoPropertyFileFoundException\, \NoScopeDefFoundException\, \ScopeAlreadyCreatedException\, and \ScopeNotCreatedException\. These provide more granular error reporting for issues such as scope lifecycle errors, definition conflicts, missing properties, and injection failures.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/error · high confidence

Add core benchmark suite for startup, resolution, and scope performance

The \projects/core/benchmark\ module now includes a comprehensive JMH-based benchmark suite to measure Koin's performance characteristics. This adds benchmarks for heavy startup scenarios (including lazy module loading), dependency resolution throughput, and scope creation/cascading costs. The suite introduces specific test harnesses for JVM and Native platforms, covering scenarios with up to 1000 modules and 400 bindings to track regression in initialization and retrieval times.

projects/core/benchmark · high confidence

Add koinActivityViewModel for Activity-scoped ViewModels

A new \koinActivityViewModel\ composable function is introduced in the Android module, allowing users to resolve a ViewModel instance scoped to the current Activity's lifecycle. This function leverages \LocalActivity\ to identify the \ComponentActivity\ as the \ViewModelStoreOwner\, ensuring the ViewModel is correctly tied to the Activity's lifecycle rather than just the Composition.

projects/compose/koin-compose-viewmodel/src/androidMain · high confidence

Added JVM performance benchmark runner

A new \PerfRunner\ utility has been added to the \jvm-perfs\ example project to measure and report Koin application startup and execution times. It provides functions to run scenarios using both standard and lazy modules, calculating average metrics across multiple iterations and allowing users to define performance limits to validate results.

jvm-perfs · high confidence

Added Java-compatible ViewModel helper functions in the Android compat module

The \koin-android-compat\ module now includes new Kotlin objects (\ViewModelCompat\, \ScopeCompat\, and \SharedViewModelCompat\) that expose static, Java-friendly methods for retrieving ViewModels. These helpers allow Java code to access Koin-managed ViewModels via \getViewModel\ and \sharedViewModel\ functions, supporting qualifiers and parameters, while internally delegating to the core Koin ViewModel resolution logic.

projects/android/koin-android-compat · high confidence

Added core definition and qualifier types

The Koin core library now includes new foundational types to support definition lifecycle management and string-based identification. Users can now utilize the new \Callbacks\ data class to register \OnCloseCallback\ handlers for managing resource cleanup when definitions are closed. Additionally, the \StringQualifier\ class has been introduced to provide a concrete implementation of the \Qualifier\ interface, allowing definitions to be identified and retrieved using simple string values.

koin-core · high confidence

Added example project scaffolding and build scripts

The examples directory now includes a README specifying Java 17 as the required runtime, along with Gradle wrapper scripts (gradlew, gradlew.bat) and helper shell scripts (clean.sh, test.sh) to facilitate building and testing the sample applications.

examples · high confidence

Added mock declaration utilities for Koin tests

The koin-test module now includes new APIs to declare and stub mocks directly within the Koin container during testing. Users can use \declareMock\ to register a mock instance with optional qualifiers and secondary types, apply stubbing logic via a lambda, and retrieve the instance. A \MockProvider\ object is also introduced to allow registration of custom mock creation strategies, enabling integration with various mocking libraries. Additionally, a \declare\ function is provided to register arbitrary instances into the container.

projects/core/koin-test/src/commonMain/kotlin/org/koin/test/mock · high confidence

Adds Koin core implementations for Kotlin/JS and Kotlin/Native targets

This change introduces the missing platform-specific implementations for the Koin dependency injection library on Kotlin/JS and Kotlin/Native. For JS, it adds a \GlobalContext\ object and a \PrintLogger\ to manage the global Koin instance and logging. For Native, it provides a thread-safe \MutableGlobalContext\ using Stately locks, a \PrintLogger\, and \ModuleExt\ functions (\factory\, \single\) that allow defining beans without requiring inlined \KClass\ types, ensuring feature parity with the JVM implementation.

projects/core/koin-core/src/jsMain/kotlin/org/koin/core, projects/core/koin-core/src/nativeMain/kotlin/org/koin/core · high confidence

Android modules now ship API signatures and R8/ProGuard consumer rules

The Android modules (koin-android, koin-android-compat, koin-android-test, koin-androidx-navigation, koin-androidx-startup, koin-androidx-workmanager, and koin-dagger-bridge) now include public API signature files (.api) to enforce binary compatibility and consumer R8/ProGuard rules files. The ProGuard rules automatically silence warnings about Koin internals and ensure that critical classes like KoinInitializer and user-defined Fragments/Workers are preserved during code shrinking, preventing runtime crashes in minified production builds.

projects/android · high confidence

Bidirectional DI bridge and request-scoped extensions for Ktor

This update introduces a new \KoinKtorApplication\ class and \KtorBridgeDSL\ that enable explicit, bidirectional dependency resolution between Koin and Ktor's native DI system. Users can now configure \koinToKtor()\ to allow Koin to resolve dependencies declared in Ktor's \dependencies\ block, and \ktorToKoin()\ to allow Ktor to resolve dependencies from Koin modules via the new \KoinDependencyMap\. Additionally, the integration now provides \inject\ and \get\ extension functions for \ApplicationCall\, \Route\, and \Routing\, allowing direct dependency injection within route handlers, and introduces a \requestScope\ DSL for defining request-scoped beans using a monotonic counter for unique scope IDs.

projects/ktor/koin-ktor/src/commonMain · high confidence

Compiler plugin support for ViewModel DSL definitions

The Koin compiler plugin now supports generating ViewModel definitions via new DSL extension functions. \ViewModelDSLExt.kt\ provides stub functions for \Module.viewModel()\ and \ScopeDSL.viewModel()\ that are intended to be implemented by the compiler plugin. \ViewModelModuleExt.kt\ introduces \buildViewModel\ functions for both \Module\ and \ScopeDSL\, allowing the plugin to create ViewModel definitions with explicit KClass and optional qualifiers, binding them as factories to the ViewModel interface.

projects/core/koin-core-viewmodel/src/commonMain/kotlin/org/koin/plugin · high confidence

Enable ViewModelScope creation via Koin options

Users can now activate the creation of a dedicated Scope for each ViewModel at creation time by enabling the \VIEWMODEL\_SCOPE\_FACTORY\ option. This is done by calling the new \viewModelScopeFactory()\ function, which returns the configuration pair required to turn on this feature. The change introduces the \KoinOption\ enum and the \hasViewModelScopeFactory\ registry check to support this behavior, allowing ViewModels to automatically manage their own scope lifecycle.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/option · high confidence

Initial Android integration layer for Koin

This change introduces the core Android-specific components for the Koin dependency injection library. It adds an Android logger that routes Koin logs to the native Android \Log\ system, and provides extension functions to easily register the Android \Context\ or \Application\ instance into the Koin container. It also includes utilities for loading properties from Android assets, Java-compatible initialization helpers, and scope management extensions for Android components like \Activity\ (via \ComponentCallbacks\) and \Service\, allowing scopes to be automatically tied to the lifecycle of these components.

projects/android/koin-android/src/main/java/org/koin/android · high confidence

Initial JUnit 4 and JUnit 5 test support modules

This change introduces the \koin-test-junit4\ and \koin-test-junit5\ modules, providing JUnit-specific integration for Koin. For JUnit 4, it adds \KoinTestRule\ to automatically start and stop the Koin context around tests, \AutoCloseKoinTest\ as a base class for automatic cleanup, and \MockProviderRule\ to support mocking. For JUnit 5, it provides \KoinTestExtension\ as a JUnit Jupiter extension for lifecycle management, \AutoCloseKoinTest\ for base class usage, and \MockProviderExtension\ for mocking support. These modules enable developers to easily integrate Koin into their JUnit test suites with automatic resource management and mock declaration capabilities.

projects/core/koin-test-junit4 · high confidence

Introduce Koin Gradle plugin with module-checking tasks

The Koin Gradle plugin is now available, allowing users to apply it via the 'koin' ID. Once applied, it registers two tasks: 'checkModules', which runs unit tests filtered by the 'org.koin.test.category.CheckModuleTest' category with standard streams enabled, and 'checkAndroidModules', which depends on 'testDebugUnitTest' and conditionally applies the same test filtering and logging when the task graph includes it.

projects/plugins/koin-gradle-plugin · high confidence

Introduction of Qualifier and TypeQualifier components for component identification

This change introduces the core \Qualifier\ interface and its implementations, \StringQualifier\ (via the \named\ and \qualifier\ factory functions) and \TypeQualifier\, within the \org.koin.core.qualifier\ package. Users can now explicitly qualify components using string names or Kotlin types, enabling more precise dependency resolution. The \TypeQualifier\ ensures type-safe identification by leveraging the full name of the Kotlin class, while the \StringQualifier\ supports both string and enum-based naming, with enum qualifiers automatically converted to lowercase strings for consistency.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier · high confidence

Introduction of a new logging API with configurable log levels

The Koin core library now includes a new logging infrastructure defined in the \org.koin.core.logger\ package. This introduces an abstract \Logger\ class that supports configurable verbosity levels (DEBUG, INFO, WARNING, ERROR, NONE) and provides convenience methods for logging messages. An \EmptyLogger\ implementation is also provided for scenarios where no logging output is desired, allowing users to suppress logs entirely.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/logger · high confidence

Koin can now resolve dependencies declared in Ktor's DI block

A new \KtorDIExtension\ has been added to the \koin-ktor\ module, enabling Koin's \inject()\ function to resolve dependencies that are explicitly declared within Ktor's \dependencies { }\ block. This integration allows Koin to bridge into Ktor's dependency injection system, ensuring that services registered via Ktor's native DI API are accessible to Koin-injected components.

koin-ktor · high confidence

New Android Compose sample application

A new sample application has been added to demonstrate Koin integration with Jetpack Compose. The example showcases dependency injection in Compose UIs, including ViewModel injection, scoped and factory-scoped dependencies, and isolated Koin contexts for SDK modules. It also demonstrates navigation patterns using both type-safe and string-based navigation graphs with shared ViewModels across screens.

examples/sample-android-compose · high confidence

New AndroidX Fragment integration with Koin

This release adds support for integrating Koin with AndroidX Fragments. It introduces a \KoinFragmentFactory\ that allows fragments to be instantiated via Koin's dependency injection, ensuring they receive their dependencies automatically. The update includes DSL extensions (\fragmentOf\, \fragment\) for defining fragment bindings in modules, as well as convenience functions like \setupKoinFragmentFactory\ for \FragmentActivity\ and \KoinApplication.fragmentFactory()\ to easily wire up the factory. This enables developers to manage fragment lifecycles and dependencies within the Koin scope.

projects/android/koin-android/src/main/java/org/koin/androidx/fragment · high confidence

New Compose scope helpers for Activity and Fragment lifecycle management

Added KoinActivityScope and KoinFragmentScope composables in the new KoinAndroidScope.kt file. These functions automatically detect the current Android context, extract the associated Koin scope via the AndroidScopeComponent interface, and provide it to the Compose tree using LocalKoinScopeContext wrapped in a ComposeContextWrapper. This enables proper scope lifecycle handling within Compose UI hierarchies tied to Activities and Fragments.

projects/compose/koin-androidx-compose/src/main/java/org/koin/androidx/compose/scope · high confidence

New DSL functions for Android component scopes

Added \activityScope\, \activityRetainedScope\, and \fragmentScope\ extension functions to \Module\, allowing users to declare dependencies scoped to the Activity lifecycle, Activity retained lifecycle, and Fragment lifecycle respectively using the new scope archetype types.

projects/android/koin-android/src/main/java/org/koin/androidx/scope/dsl · high confidence

New Koin DSL and WorkerFactory for AndroidX WorkManager integration

The \koin-androidx-workmanager\ module now provides a complete integration layer for AndroidX WorkManager, allowing developers to declare and resolve \ListenableWorker\ instances via Koin's dependency injection. This change introduces a \KoinWorkerFactory\ that bridges WorkManager's worker creation process with Koin, ensuring workers are instantiated with their injected dependencies and parameters. It also adds DSL extensions (\worker\, \workerOf\) for both \Module\ and \Scope\ contexts, enabling concise worker registration with support for qualifiers and constructor parameters. Additionally, a \workManagerFactory()\ extension on \KoinApplication\ simplifies the initialization of WorkManager with the Koin factory, handling the setup of the \DelegatingWorkerFactory\ to ensure proper worker resolution.

projects/android/koin-androidx-workmanager · high confidence

New Koin Multiplatform Infrastructure API

The Koin core library now exposes a new \org.koin.mp\ package containing platform-agnostic helper classes (\KoinPlatform\, \KoinPlatformTools\, \ThreadLocal\) that use Kotlin \expect\ declarations to bridge multiplatform-specific behaviors. This includes a new \generateId()\ function for creating unique identifiers and standardized tools for logging, context management, and thread safety, providing a unified foundation for Koin's operation across different Kotlin targets.

projects/core/koin-core/src/commonMain/kotlin/org/koin/mp · high confidence

New Koin annotation definitions for Android scopes and monitoring

The \koin-annotations\ module now exposes the public API for core and Android-specific annotations, enabling compile-time dependency injection definitions. This includes new scope archetypes for Android lifecycle management (\ActivityScope\, \ActivityRetainedScope\, \FragmentScope\, \ViewModelScope\), a \KoinWorker\ annotation for background tasks, and a \Monitor\ annotation for performance tracing via Kotzilla. These annotations allow developers to declare singletons, factories, and scoped dependencies using declarative syntax rather than DSL code.

projects/core/koin-annotations · high confidence

New Koin context management API

The Koin core library introduces a new \KoinContext\ interface and a \DefaultContextExt\ file to manage the global Koin application lifecycle. Users can now start, stop, load, and unload Koin modules via the new \startKoin\, \stopKoin\, \loadKoinModules\, and \unloadKoinModules\ extension functions, which delegate to the default platform context. This provides a standardized way to interact with the Koin container's global state.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/context · high confidence

New Koin core annotations for dependency injection verification

The koin-core-annotations module now exposes two new annotations: @InjectedParam, which marks constructor or function parameters to tag them as injected dependencies for verification purposes, and @Provided, which tags dependencies as already provided by Koin (such as those from DSL dynamic declarations or internals). These annotations are available in the org.koin.core.annotation package and can be used to improve type safety and verification within Koin-based applications.

projects/core/koin-core-annotations · high confidence

New Koin extension system for adding additional features

This change introduces a new extension mechanism within the Koin core, allowing users to add and manage additional features through the \KoinExtension\ interface and \ExtensionManager\. The \KoinExtension\ interface defines lifecycle hooks (\onRegister\ and \onClose\) for extensions to integrate with the Koin instance, while \ExtensionManager\ provides methods to register, retrieve, and close these extensions. This enables modular feature addition to Koin without modifying the core container directly.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/extension · high confidence

New Koin extension utilities and sample applications

This update introduces several new capabilities and examples. It adds a sample Android Compose app demonstrating a User data model, and a new sample Desktop Compose app that showcases Koin integration with a factory-scoped dependency and UI state management. On the core library side, new extension functions are provided for Kotlin mutable properties to inject dependencies directly, a utility to retrieve full class names with caching, and a string helper to strip quotes. For the JVM platform, KoinApplication now supports loading properties from files or environment variables, and a new Java component object offers static methods for Java code to inject or retrieve dependencies lazily or eagerly.

(repo-wide) · high confidence

New Koin sandbox samples for scopes, SDK integration, and WorkManager

The androidx-samples module now includes new example components demonstrating Koin usage in Android. A new RandomId utility is added, alongside SDKActivity which shows how to use a custom Koin instance via CustomKoinComponent and verifies that scoped services are not present in the global context. ScopedActivityA and ScopedFragment demonstrate activity-retained and fragment-scoped injection, including assertions that scoped Session instances are distinct across different scopes and match their parent components. Additionally, SimpleWorker provides a WorkManager example that injects a service to process input data.

androidx-samples · high confidence

New Koin-Dagger bridge for accessing Dagger components in Koin

A new \koin-dagger-bridge\ module has been introduced, providing extension functions (\dagger\<T\>()\) that allow Koin scopes to retrieve instances from Dagger Entry Points. This enables developers to inject Dagger-managed components directly into Koin modules, facilitating interoperability between the two dependency injection frameworks.

projects/android/koin-dagger-bridge · high confidence

New KoinComponent and KoinScopeComponent interfaces for instance and scope injection

The Koin library introduces two new marker interfaces, KoinComponent and KoinScopeComponent, to simplify dependency injection in user classes. Implementing KoinComponent provides extension functions to easily retrieve instances via get() or inject() directly from the class, handling scope resolution automatically if the class also implements KoinScopeComponent. KoinScopeComponent adds scope management capabilities, allowing instances to create, retrieve, or lazily initialize their own scopes using helper functions like createScope() and getOrCreateScope().

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/component · high confidence

New ViewModel extension APIs for Activity and Fragment

The Koin Android library now provides new extension functions to retrieve ViewModels from ComponentActivity and Fragment. For ComponentActivity, developers can use viewModel() and getViewModel() to access ViewModels with support for qualifiers, creation extras, and parameters. For Fragment, viewModel() and getViewModel() allow accessing ViewModels with an optional owner producer, while activityViewModel() and getActivityViewModel() enable sharing ViewModels with the parent Activity. Additionally, viewModelForClass() is available for both Activity and Fragment to retrieve ViewModels by class type, supporting saved state definitions and custom keys. These extensions integrate with Koin's scope management and leverage the AndroidX ViewModel library's CreationExtras API.

projects/android/koin-android/src/main/java/org/koin/androidx/viewmodel/ext · high confidence

New ViewModel scope management with automatic lifecycle handling

This change introduces a new \ScopeViewModel\ base class and a \viewModelScope()\ extension function that automatically creates and manages a Koin scope tied to the ViewModel's lifecycle. The scope is now automatically closed when the ViewModel is cleared via \ViewModelScopeAutoCloseable\, removing the need for manual cleanup or the deprecated \onCloseScope\ override. Additionally, a new \viewModelScope\ DSL block is available in modules to declare ViewModels and scoped dependencies that are resolved within this specific ViewModel scope archetype.

projects/core/koin-core-viewmodel/src/commonMain/kotlin/org/koin/viewmodel/scope · high confidence

New abstract Activity and Fragment base classes for Koin scopes

Added \RetainedScopeActivity\, \ScopeActivity\, and \ScopeFragment\ in the \koin-android\ module. These abstract classes extend Android's \AppCompatActivity\ and \Fragment\ respectively, implementing \AndroidScopeComponent\ to automatically manage Koin scopes tied to the lifecycle of the UI component via \activityRetainedScope()\, \activityScope()\, and \fragmentScope()\ delegates.

koin-android · high confidence

New constructor-reference DSL functions and options API for Koin definitions

The Koin DSL now includes \singleOf\, \factoryOf\, and \scopedOf\ extension functions that accept a constructor reference (e.g., \::MyClass\) to resolve dependencies at compile time without reflection. These functions support constructors with up to 19 parameters and allow optional configuration via a new \withOptions\ DSL block, which enables setting qualifiers (\named\), secondary type bindings (\bind\), eager initialization (\createdAtStart\), and explicit override permissions (\override\). A corresponding \new\ helper function is also provided to resolve constructor arguments within scopes.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl · high confidence

New coroutine integration APIs and lazy module support

The \koin-core-coroutines\ module now exposes a public API for integrating Koin with Kotlin Coroutines. Users can configure a \CoroutineDispatcher\ via the new \coroutinesEngine\ extension, load modules lazily using \lazyModules\ and the \LazyModule\ DSL, and control startup synchronization with functions like \runOnKoinStarted\, \awaitAllStartJobs\, and \waitAllStartJobs\. Additionally, a \runBlocking\ utility is provided for multiplatform coroutine execution.

projects/core/koin-core-coroutines · high confidence

New koinViewModel Composable for shared ViewModel resolution

A new \koinViewModel\ Composable function has been added to the \koin-compose-viewmodel\ module, enabling the resolution of Koin-managed ViewModels within Jetpack Compose UIs. This function allows users to inject ViewModels with optional qualifiers, parameters, and custom scopes, bridging the Koin dependency injection container with the AndroidX ViewModel lifecycle. It is designed for use in common source sets, facilitating shared ViewModel logic across multiplatform projects.

projects/compose/koin-compose-viewmodel/src/commonMain/kotlin/org/koin/compose/viewmodel · high confidence

New navigation-scoped dependency injection and ViewModel sharing in Compose

This update introduces a new way to manage dependencies and ViewModels tied to the navigation graph in Jetpack Compose. Developers can now use the \navigationScope\ DSL within Koin modules to define dependencies that are scoped to individual navigation destinations (back stack entries), ensuring they are created when a screen becomes active and destroyed when navigating away. Additionally, the \NavBackStackEntry.sharedKoinViewModel\ extension function allows ViewModels to be shared across different navigation destinations by reusing the ViewModel instance from a parent graph entry, while the legacy \koinNavViewModel\ function is deprecated in favor of the standard \koinViewModel\.

projects/compose/koin-compose-viewmodel-navigation · high confidence

New opt-in annotations for internal, experimental, delicate, and ViewModelScope APIs

The Koin core library introduces four new opt-in annotations to clarify API stability and usage requirements. Developers must now explicitly opt-in to use \@KoinInternalAPI\ for internal framework mechanisms (enforced at ERROR level), \@KoinExperimentalAPI\ for features under active development (WARNING level), and \@KoinDelicateAPI\ for advanced APIs with potential side effects (WARNING level). Additionally, \@KoinViewModelScopeApi\ is introduced to manage ViewModel scope injection, requiring developers to opt-in when using ViewModel-specific scoping features to ensure correct instance resolution.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/annotation · high confidence

New project-level build, test, and documentation tooling

The \projects/\ directory now includes a suite of shell scripts and documentation files to streamline development and release workflows. Users can run \./test.sh\ to execute JVM and Android tests while explicitly including KMP module JVM tests (preventing silent skips), \./test-macos.sh\ for native targets, and \./benchmark.sh\ for JVM and macOS benchmarks. A new \benchmark-gc.sh\ script allows direct JMH GC profiling to validate allocation performance. Build and release operations are simplified via \./install.sh\ (publish to Maven Local) and \./release.sh\ (publish to Central Portal). API compatibility is enforced with \./compare\_apis.sh\ to diff public API dumps against \main\. The \projects/CLAUDE.md\ file documents project doctrine, PR guards (binary compatibility and regression testing), and known KMP test traps, while \projects/llms.txt\ provides an API cheat sheet. Additionally, the Gradle wrapper scripts (\gradlew\, \gradlew.bat\) have been moved into \projects/\ and updated to set explicit default JVM memory options (\-Xmx64m -Xms64m\).

projects · high confidence

Parallel lazy module loading with coroutine support

Koin now supports loading lazy modules in parallel background coroutines to significantly reduce startup time. The new \lazyModules()\ extension on \KoinApplication\ accepts a list of \Lazy\<Module\>\ instances and initializes each in its own coroutine job, while the \coroutinesEngine()\ extension registers the underlying engine and allows specifying a custom \CoroutineDispatcher\. A new \LazyModule\ DSL (\lazyModule { ... }\) creates thread-safe lazy module wrappers, and \ModuleConfiguration\ allows grouping regular and lazy modules together with a shared dispatcher. For synchronization, \Koin.awaitAllStartJobs()\ (suspend) and \Koin.waitAllStartJobs()\ (blocking, with JS limitations) let callers wait for all lazy module jobs to complete, and \Koin.onKoinStarted()\ provides a convenient hook to run code after initialization. The \includes()\ extension on \Module\ now supports including \Lazy\<Module\>\ instances, and \loadKoinModules()\ in the global context supports lazy modules.

projects/core/koin-core-coroutines/src/commonMain · high confidence

Stabilized ViewModel API and added R8 consumer rules

This release introduces the official public API surface for the Koin ViewModel module, exposing DSL functions for defining ViewModels in modules and scopes, factory classes for resolution, and utilities for handling Android Bundle and CreationExtras. It also includes a new ScopeViewModel base class and extension functions for managing ViewModel scopes. To support modern build configurations, R8/ProGuard consumer rules are now shipped with the library to silence warnings about Koin internals, clarifying that ViewModel resolution relies on compile-time reified types rather than runtime reflection.

projects/core/koin-core-viewmodel · high confidence

Removals

Removal of legacy Koin core implementation

The legacy Koin dependency injection implementation has been removed from the codebase. This change deletes the core components including the \Koin\ context builder, \Context\, \BeanRegistry\, \InstanceFactory\, and \PropertyResolver\, along with supporting data classes like \BeanDefinition\ and \BeanType\, and error classes. Users relying on this specific version of the Koin library will no longer have access to these core APIs.

src/main/kotlin/org/koin · high confidence

API

New API dump for Koin AndroidX Compose integration

An API dump file has been added for the koin-androidx-compose module, documenting the public Compose functions KoinAndroidContext, KoinActivityScope, and KoinFragmentScope. This establishes the baseline public API surface for users integrating Koin with Jetpack Compose, ensuring that these scope and context composables are explicitly tracked for binary compatibility.

projects/compose/koin-androidx-compose · high confidence

New internal API for NavViewModelInternalsKt.defaultNavExtras

The library now exposes a new internal function, \defaultNavExtras\, within the \NavViewModelInternalsKt\ class. This function accepts a \ViewModelStoreOwner\, a \Composer\, and an integer, and returns a \CreationExtras\ object. This change is reflected in the updated API dump for the \koin-androidx-compose-navigation\ module, indicating a structural addition to the internal navigation integration layer.

projects/compose/koin-androidx-compose-navigation · high confidence

Published API signatures for Koin Ktor and SLF4J Logger modules

The Koin Ktor and Koin Logger SLF4J modules now include published API signature files (koin-ktor.api, koin-ktor3.api, and koin-logger-slf4j.api) that define the public surface for binary compatibility checks. These signatures expose the core integration classes and extension functions, including KoinApplication wrappers, dependency injection plugins, request-scoped components, and utility extensions for Application, Route, and Routing contexts, ensuring that public APIs remain stable across versions.

projects/ktor · high confidence

Behavioural changes

Added JS-specific coroutine tools with experimental warning

The JS platform implementation of Koin's coroutine tools now provides a \runBlocking\ function that executes suspend blocks via \GlobalScope.promise\. This implementation includes a runtime warning indicating that using \runBlocking\ on JS is experimental, distinguishing it from the native implementation which delegates directly to \kotlinx.coroutines.runBlocking\.

projects/core/koin-core-coroutines/src/jsMain · high confidence

Added R8/ProGuard consumer rules for Koin Compose ViewModel

The koin-compose-viewmodel module now ships with consumer R8/ProGuard rules (consumer-rules.pro) that are automatically applied to consuming applications. These rules suppress warnings regarding Koin's internal Kotlin reflection metadata and clarify that ViewModels do not need to be explicitly kept from obfuscation by Koin, as resolution is handled at compile-time via reified inline functions. This change ensures cleaner builds and reduces noise for users integrating this library.

projects/compose/koin-compose-viewmodel · high confidence

Android sample app restructured with lazy modules and ViewModel scope support

The Android sample application has been updated to demonstrate modern Koin patterns, specifically the use of \lazyModule\ for parallel module loading to improve startup performance and the \viewModelScope\ for managing ViewModel lifecycles within a specific scope. The \MainApplication\ now configures these features, and the \AppModule\ and related DI files have been refactored to use the new DSL functions like \activityRetainedScope\ and \viewModelScope\, while also introducing \ScopeViewModel\ for more granular scope control.

examples/androidx-samples/src/main/java · high confidence

Deprecate KoinAndroidContext and introduce koinViewModel for AndroidX Compose

The KoinAndroidContext composable is now deprecated and no longer required, as the Koin context is automatically set up via StartKoin(). A new koinViewModel function has been added to resolve AndroidX ViewModels within Compose, leveraging the current Koin scope and ViewModelStoreOwner.

projects/compose/koin-androidx-compose/src/main/java/org/koin/androidx/compose · high confidence

Deprecate ViewModel DSL in koin-compose-viewmodel

The ViewModel DSL extension functions in the \org.koin.compose.viewmodel.dsl\ package (including \Module.viewModel\, \ScopeDSL.viewModel\, and the \viewModelOf\ overloads) are now deprecated. Users should remove these old imports and migrate to \org.koin.core.module.dsl.\*\ to support a unified ViewModel DSL for both Android and Compose.

projects/compose/koin-compose-viewmodel/src/commonMain/kotlin/org/koin/compose/viewmodel/dsl · high confidence

Deprecation of Android ViewModel DSL in koin-android

The ViewModel DSL extension functions in the \org.koin.androidx.viewmodel.dsl\ package (including \viewModel\, \viewModelOf\, and their scope variants) are now deprecated. Users must migrate their imports to \org.koin.core.module.dsl.\*\ to use the unified ViewModel DSL available in the \koin-viewmodel\ module, which supports both Android and Compose.

projects/android/koin-android/src/main/java/org/koin/androidx/viewmodel/dsl · high confidence

Deprecation of koinNavViewModel in favor of koinViewModel

The \koinNavViewModel\ composable function in the AndroidX Compose Navigation module is now deprecated. Users should migrate to \koinViewModel\ from \org.koin.compose.viewmodel.koinViewModel\, as the underlying implementation is identical. The deprecated function remains available but will be removed in a future release, and its usage is flagged with a deprecation warning directing users to the standard ViewModel integration.

projects/compose/koin-androidx-compose-navigation/src/main/java · high confidence

Improved ViewModel scope management and clearer error messages for SavedStateHandle

The ViewModel factory now provides better support for Android's SavedStateHandle by introducing AndroidParametersHolder, which intercepts SavedStateHandle requests and throws a specific, actionable error if the ViewModel's CreationExtras lacks a SavedStateRegistryOwner (fixing \#2417). Additionally, when a viewModelScopeFactory is configured, the factory automatically creates a dedicated scope for the ViewModel and explicitly links it to the parent scope (fixing \#2299), ensuring that scoped dependencies resolve correctly. This auto-created scope is also registered as an AutoCloseable, ensuring it is cleaned up when the ViewModel is cleared.

projects/core/koin-core-viewmodel/src/commonMain/kotlin/org/koin/viewmodel/factory · high confidence

JVM coroutine platform tools and API stability updates

The JVM-specific coroutine integration now defaults to Dispatchers.Default instead of IO, and introduces the runOnKoinStarted extension function to allow blocking execution of code after all lazy modules have loaded. Additionally, the waitKoinStart helper and KoinPlatformCoroutinesTools implementation are established to support these startup synchronization patterns, ensuring ABI compatibility for existing coroutine-based initialization flows.

projects/core/koin-core-coroutines/src/jvmMain · high confidence

JVM platform tools implementation for Koin core

The JVM-specific implementation of Koin's platform abstraction layer has been updated to provide concrete definitions for core utilities. This includes generating unique identifiers using Kotlin's native \Uuid\ API, defining thread-local storage via \java.lang.ThreadLocal\, and establishing default behaviors for logging, context management, and thread-safe collections (ConcurrentHashMap). These changes ensure the core library functions correctly on the JVM by replacing abstract declarations with actual platform-specific code.

projects/core/koin-core/src/jvmMain/kotlin/org/koin/mp · high confidence

Koin Core API signature update and ABI compatibility fixes

This release updates the public API surface of the Koin core library, introducing new overloads for \createScope\ in \Koin\ and \KoinScopeComponent\ that accept additional parameters like \TypeQualifier\. It also adds an \Options\ API to \KoinApplication\ for configuring startup options and introduces new annotations (\KoinDelicateAPI\, \KoinExperimentalAPI\, etc.) to mark API stability levels. The commit history indicates specific fixes to restore ABI compatibility for \runOnKoinStarted\ and resolve breaking changes in \BeanDef\ constructors, ensuring existing applications remain compatible while exposing these new configuration capabilities.

projects/core/koin-core · high confidence

ModuleConfiguration verification now includes lazy modules

The \verify\ extension function on \ModuleConfiguration\ has been updated to validate both standard modules and lazy modules. Previously, verification likely only covered the primary module list; this change ensures that dependencies within lazy modules are also checked for correctness, providing a more comprehensive validation of the application's dependency graph during tests.

projects/core/koin-test-coroutines · high confidence

New DSL functions for binding, overriding, and configuration management

The Koin DSL now includes new extension functions for \KoinDefinition\ to support more granular control: \bind()\ and \binds()\ allow registering secondary types for a definition, \override()\ enables targeted overrides for specific definitions even when global override is disabled, and \onClose()\ registers cleanup callbacks. Additionally, a new \KoinConfiguration\ class and \koinConfiguration()\ helper function have been introduced to help declare, extend, and reuse Koin configuration blocks, with \KoinApplication.includes()\ supporting these configurations. The \koinApplication()\ function has been updated to accept \KoinConfiguration\ instances alongside existing lambda declarations.

projects/core/koin-core/src/commonMain/kotlin/org/koin/dsl · high confidence

New ViewModel creation and extras handling APIs

The Koin ViewModel module now exposes new extension functions and internal resolution logic to better integrate with Android's \CreationExtras\ and \SavedState\ APIs. \BundleExt.kt\ adds \SavedState.toExtras()\ to convert saved state into creation extras and defines \SavedStateDefinition\ for state handling. \CreationExtrasExt.kt\ provides \defaultExtras()\ to retrieve default creation extras from a \ViewModelStoreOwner\. \GetViewModel.kt\ introduces \resolveViewModel()\ and \lazyResolveViewModel()\ to handle ViewModel instantiation using these extras, supporting qualifiers and parameter injection.

projects/core/koin-core-viewmodel/src/commonMain/kotlin/org/koin/viewmodel · high confidence

New parameter injection modes: indexed, set, and fallback

The Koin core library now introduces a new \ParametersHolder\ class and associated factory functions (\parameterArrayOf\, \parameterSetOf\, \parametersOf\) to control how constructor parameters are resolved. Users can now explicitly choose between indexed injection (consuming parameters in order via \parameterArrayOf\), set-based injection (finding the first matching type via \parameterSetOf\), or a fallback mode (\parametersOf\) that attempts indexed resolution first and falls back to type matching if no index is found. This change provides finer control over dependency injection, particularly for scenarios involving multiple parameters of the same type or mixed-type parameter lists.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/parameter · high confidence

New strict override mode and resolution extension API in Koin core

The Koin core module now exposes a \strictOverride()\ configuration option on \KoinApplication\ that disables global definition overriding, requiring explicit opt-in for overrides via the DSL. Additionally, an experimental \addResolutionExtension()\ method has been added to the \Koin\ class, allowing users to register custom \ResolutionExtension\ implementations to bridge Koin with external dependency injection systems such as Ktor.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core · high confidence

Refactor time measurement utilities to use Kotlin standard library

The time measurement utilities in the core library have been reworked to replace custom platform-specific time tools with Kotlin's standard \kotlin.time\ API. A new \DurationExt.kt\ file provides a helper to convert \Duration\ to milliseconds, while the previous \Measure.kt\ and \Timer.kt\ implementations have been commented out in favor of this cleaner, standard-library-based approach.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/time · medium confidence

Refactored Module DSL with strict override handling and DSL markers

The Koin module definition API has been refactored to improve type safety and override control. New DSL markers (KoinApplicationDslMarker, KoinDslMarker, OptionDslMarker) are introduced to prevent incorrect DSL nesting. The Module class now uses LinkedHashSet for eager instances and scopes to ensure deterministic ordering, and includes a deprecated throwOverrideError function to explicitly handle definition overrides, replacing the previous behavior with stricter control over bean conflicts.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module · high confidence

Refactored Scope API and lifecycle management

The core Scope implementation has been restructured to improve instance resolution and lifecycle handling. The \Scope\ class now explicitly manages linked scopes via \linkTo\ and \unlink\ methods, allowing instances to be resolved from parent scopes in the hierarchy. A new \ScopeCallback\ interface has been introduced to handle events when a scope is closing, providing a cleaner mechanism for cleanup logic. Additionally, the API for retrieving instances has been refined, with \getSource\ deprecated in favor of standard resolution, and internal parameter stack management optimized for thread-local performance.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/scope · high confidence

Refactored instance creation and scoping with thread-safe factories

The instance management layer in Koin has been restructured to improve thread safety and resolution accuracy. A new abstract \InstanceFactory\ base class now defines the core lifecycle (create, get, drop), implemented by specific factories: \SingleInstanceFactory\ for singletons, \ScopedInstanceFactory\ for scope-bound instances, and \FactoryInstanceFactory\ for factory-scoped instances. The scoped and single factories now use double-checked locking to prevent race conditions during instance creation. Additionally, a new \ResolutionContext\ class centralizes resolution metadata (logger, scope, qualifier, parameters), and scope resolution logic has been updated to correctly handle scope archetypes and prevent value leaks when declaring instances within a scope.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/instance · high confidence

Removal of legacy Module and EmptyModule classes

The legacy \Module\ abstract class and the \EmptyModule\ implementation have been removed from the codebase. This eliminates the previous mechanism for defining beans via the \onLoad\ lifecycle method and the \declareContext\ helper, reflecting a shift in how dependency definitions are structured within the Koin framework.

src/main/kotlin/org/koin/module · high confidence

Reworked Android scope APIs for Activity, Fragment, and ViewModel

The Android scope extension functions in \koin-android\ have been updated to use new \TypeQualifier\-based archetypes (\ActivityScopeArchetype\, \ActivityRetainedScopeArchetype\, \FragmentScopeArchetype\) for creating and managing scopes. Activity and Fragment scopes now explicitly link to parent scopes when configured, and the retained activity scope is now backed by a \ScopeHandlerViewModel\ to survive configuration changes. The legacy \ScopeViewModel\ class is deprecated in favor of \org.koin.viewmodel.scope.ScopeViewModel\.

projects/android/koin-android/src/main/java/org/koin/androidx/scope · high confidence

Reworked BeanDefinition structure and API compatibility

The core bean definition model has been restructured to improve performance and stability. Secondary type registration via \bind()\ and \binds()\ is now O(1), avoiding unnecessary list allocations. A deprecated constructor is provided to maintain binary compatibility with code compiled against Koin 4.1.x. Additionally, \hashCode\ and \equals\ implementations have been stabilized to ensure consistent behavior for bean definitions.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/definition · high confidence

Reworked Koin Compose lifecycle management and API signatures

The Koin Compose integration has been significantly restructured to improve lifecycle handling and API clarity. The \KoinApplication\ composable now accepts a \KoinConfiguration\ block instead of a raw \KoinAppDeclaration\, providing a more natural configuration style. Lifecycle management for the Koin application, scopes, and modules is now handled via \RememberObserver\ implementations (\CompositionKoinApplicationLoader\, \CompositionKoinScopeLoader\, \CompositionKoinModuleLoader\), ensuring that scopes and modules are properly closed or unloaded when compositions are forgotten or abandoned, which prevents memory leaks and premature releases. The API introduces \ComposeContextWrapper\ to manage context recovery and reset values, and deprecates \LocalKoinScope\ and \LocalKoinApplication\ in favor of \LocalKoinScopeContext\ and \getKoin()\. New functions like \koinActivityInject\ for Activity-scoped dependencies and \UnboundKoinScope\ for manual lifecycle management are added, while \koinInject\ signatures are adjusted to support \ParametersHolder\ directly for better performance.

projects/compose/koin-compose · high confidence

Updated Android performance benchmark results

The \examples/android-perfs/Benchs\ file has been updated with new performance measurement data for the Android application. The diff shows recorded start and execution times across multiple devices (OnePlus Nord, Nokia 7p, Honor 5x, LG G4) and Android versions, specifically comparing baseline versions (e.g., 2.0.1) against newer builds (e.g., 2.1.0-alpha-8). This change reflects updated empirical evidence of app performance characteristics rather than a functional change to the application itself.

examples/android-perfs · high confidence

Updated Koin platform tools for JS and Native targets

The Koin core library now uses Kotlin's experimental \kotlin.uuid.Uuid\ for generating unique identifiers on JS and Native targets, replacing previous platform-specific implementations. Additionally, the JS and Native \KoinPlatformTools\ implementations have been updated to use Stately collections (\ConcurrentMutableMap\, \ConcurrentMutableSet\) for thread-safe data structures, and Native targets now utilize Stately's \Lock\ for synchronization, ensuring safer concurrent access in multi-threaded environments.

projects/core/koin-core/src/jsMain/kotlin/org/koin/mp, projects/core/koin-core/src/nativeMain/kotlin/org/koin/mp · high confidence

Fixes

Fix ClassCastException when loading non-String environment properties

Koin now tolerates environment properties that do not have String values, preventing a crash when loading system properties or environment variables. The new \PropertyRegistryExt\ implementation in the JVM core filters out non-String keys and preserves non-String values instead of hard-casting them to String, which previously caused a \ClassCastException\ (issue \#2348). This change also introduces new JVM-specific utilities, including a \PrintLogger\ for standard output/error logging, a \Scope.get\ overload for Java classes, and a \GlobalContext\ object to manage the global Koin application lifecycle.

projects/core/koin-core/src/jvmMain/kotlin/org/koin/core · high confidence

Refactored core registry components for improved scope and instance management

The core registry logic has been restructured into dedicated classes: InstanceRegistry, ScopeRegistry, OptionRegistry, and PropertyRegistry. This change introduces a new InstanceRegistry that manages instance factories and supports declared scoped instances to prevent value leaks, while ScopeRegistry now handles scope lifecycle and archetype resolution. These refactors aim to fix various scope resolution, override, and memory leak issues reported in the project.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/registry · high confidence

Refactored instance resolution engine with improved scope and parameter handling

The instance resolution logic in Koin has been refactored to fix several bugs related to scope resolution, parameter stacking, and error messaging. CoreResolverV2 now correctly handles stacked parameters in linked scopes (fixing issues where parent parameters were lost) and prevents qualified dependencies from being incorrectly shadowed by stacked parameters. It also ensures that scoped dependencies of root factories resolve within the correct scope context rather than falling back to the root. Additionally, error messages for missing definitions are now more actionable, specifically providing clear guidance for Android's SavedStateHandle usage.

projects/core/koin-core/src/commonMain/kotlin/org/koin/core/resolution · high confidence

Standardized Gradle publishing and signing configuration

The Gradle build now uses dedicated, reusable scripts to configure Maven publishing and artifact signing. New files in the \projects/gradle\ directory (\publish-android.gradle.kts\, \publish-java.gradle.kts\, \publish-pom.gradle.kts\, \publish.gradle.kts\, and \signing.gradle.kts\) centralize the definition of Maven publications, ensuring that source and Javadoc JARs are attached to Android, Java, and platform publications. The signing script enforces PGP signing for release builds by explicitly adding signing tasks as dependencies for local and remote repository publishing tasks (Sonatype and nmcp), ensuring artifacts are signed before upload.

projects/gradle · high confidence

Test coverage

Added API dump for koin-test module; Added Android-specific module verification tests; Added JVM test suite for Koin core stability and Java interoperability; Added JVM tests for Koin coroutines integration and lazy module performance; Added KoinTest interface and MockParameter support for testing; Added common test components and test cases for Koin testing; Added comprehensive test suite for Koin core functionality; Added module verification and activity launch tests for AndroidX samples; Added performance test runner for Koin benchmarks; Added regression tests for ViewModel scope linking, qualified parameter resolution, and SavedStateHandle errors; Added tests for Android Koin module integration and scope resolution; Added tests for Android activity and fragment scope archetypes; Added tests for Koin module verification API; Added tests for Koin module verification and coffee maker behavior; Added tests for Koin-Ktor DI bridge and request scope uniqueness; Added tests for ViewModel resolution logic; Added tests for the deprecated checkModules API; Added tests for the lazyModule operator; New module verification API for detecting missing definitions and circular injections; Removal of legacy Koin test suite and supporting resources.

Dependencies

Gradle wrapper upgraded to version 8.11.1

The Gradle wrapper configuration in the examples/gradle directory has been updated to use Gradle 8.11.1, replacing the previous version 3.3. This ensures that example projects build with a modern, supported version of the Gradle build tool.

examples/gradle · high confidence

Koin 4.2.1 release with Kotlin 2.3.20 and Ktor 3.3.1

This release updates the Koin dependency ecosystem to version 4.2.1, built against Kotlin 2.3.20 and Ktor 3.3.1. The examples and project build configuration now use Android Gradle Plugin 8.9.1 and JetBrains Compose 1.10.0. The Koin BOM and individual modules (core, android, compose, ktor) have been restructured to use version catalogs and centralized version management, ensuring consistent dependency resolution across the library and its sample applications.

(dependencies) · high confidence

Update Gradle wrapper to version 8.14.3

The Gradle wrapper configuration has been updated to use Gradle 8.14.3. This ensures that builds for this project will consistently use this specific version of the Gradle build tool, improving reproducibility and potentially leveraging new features or performance improvements available in this release.

projects/gradle/wrapper · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 64 → 69 (+4.9)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 99 → 99 (+0.0)
  • Architecture 98 → 99 (+0.2)
  • Maturity 56 → 66 (+10.6)
  • Readiness 60 → 60 (+0.2)
  • Security 71 → 71 (+0.0)
  • Performance 83 → 100 (+17.3)

Resolved (12)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: contradicts the code (docs/setup/index.md)
  • Duplicate DSL entry points for definition-based registration. ModuleExtKt and ScopeSetExtKt expose identical signatures for viewModel and fragment. This creates ambiguity for users regarding which extension function to import/use, as they appear to do the same thing (register a definition) but belong to different receiver types that are often used interchangeably in DSL blocks.
  • Duplicated block (177 lines × 2) (projects/android/koin-android/src/main/java/org/koin/androidx/fragment/dsl/FragmentOf.kt)
  • Duplicated block (177 lines × 2) (projects/android/koin-androidx-workmanager/src/main/java/org/koin/androidx/workmanager/dsl/ScopeWorkerOf.kt)
  • Duplicated block (177 lines × 2) (projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt)
  • Duplicated block (177 lines × 6) (projects/android/koin-android/src/main/java/org/koin/androidx/viewmodel/dsl/ScopeViewModelOf.kt)
  • Duplicated block (35 lines × 3) (projects/ktor/koin-ktor/src/commonMain/kotlin/org/koin/ktor/ext/ApplicationCallExt.kt)
  • Duplicated block (43 lines × 2) (projects/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt)
  • Inconsistent naming for scope creation. ServiceExtKt has createServiceScope and serviceScope (ambiguous if it gets or creates), while ComponentActivityExtKt has createActivityScope. The pattern create[Type]Scope is not applied uniformly (e.g., FragmentExtKt has createFragmentScope but also createScope).
  • Inconsistent naming for scope retrieval across Android component types. While getScopeOrNull is consistent, ComponentCallbacksExtKt also exposes createScope(source: Any?): Scope and newScope(): Lazy<Scope>, whereas ComponentActivityExtKt uses createActivityScope() and createActivityRetainedScope(). This forces users to remember different method names for similar operations (creating a new scope) depending on the Android component.
  • Inconsistent parameter handling in koinInject. One overload takes Function0<ParametersHolder> (lazy), another takes ParametersHolder (eager/direct). This inconsistency in how parameters are passed (lazy vs eager) within the same method family is confusing.

New (822)

  • Banned license: org.openjdk.jmh:jmh-core
  • Banned license: org.openjdk.jmh:jmh-generator-annprocess
  • Duplicated block (177 lines × 2) (projects/android/koin-android/src/main/java/org/koin/androidx/fragment/dsl/FragmentOf.kt)
  • Duplicated block (177 lines × 2) (projects/android/koin-androidx-workmanager/src/main/java/org/koin/androidx/workmanager/dsl/ScopeWorkerOf.kt)
  • Duplicated block (177 lines × 2) (projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt)
  • Duplicated block (177 lines × 6) (projects/android/koin-android/src/main/java/org/koin/androidx/viewmodel/dsl/ScopeViewModelOf.kt)
  • Duplicated block (35 lines × 3) (projects/ktor/koin-ktor/src/commonMain/kotlin/org/koin/ktor/ext/ApplicationCallExt.kt)
  • Duplicated block (43 lines × 2) (projects/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt)
  • Edited copies of one member (7 members, 1+ corresponding lines) (projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/New.kt)
  • Edited copy of a member (10 corresponding lines) (projects/android/koin-android/src/main/java/org/koin/androidx/viewmodel/ext/android/FragmentActivityVM.kt)
  • Edited copy of a member (10 corresponding lines) (projects/compose/koin-compose-navigation3/src/commonMain/kotlin/org/koin/dsl/navigation3/ModuleExt.kt)
  • Edited copy of a member (14 corresponding lines) (projects/android/koin-android/src/main/java/org/koin/androidx/viewmodel/ext/android/ViewModelLazy.kt)
  • Edited copy of a member (18 corresponding lines) (projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt)
  • Edited copy of a member (22 corresponding lines) (examples/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/navigation/NavigationScreens.kt)
  • Edited copy of a member (26 corresponding lines) (examples/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/navigation/NavigationScreens.kt)
  • Edited copy of a member (3 corresponding lines) (projects/android/koin-androidx-workmanager/src/main/java/org/koin/plugin/module/dsl/WorkerModuleExt.kt)
  • Edited copy of a member (3 corresponding lines) (projects/android/koin-androidx-workmanager/src/main/java/org/koin/plugin/module/dsl/WorkerModuleExt.kt)
  • Edited copy of a member (6 corresponding lines) (projects/compose/koin-compose/src/androidMain/kotlin/org/koin/compose/activity/KoinActivityInject.kt)
  • Edited copy of a member (7 corresponding lines) (projects/core/koin-core/src/commonMain/kotlin/org/koin/core/resolution/CoreResolver.kt)
  • Outdated (compile): ch.qos.logback:logback-classic
  • …and 802 more

Changes since last survey

  • 1 commits — 1 feature/other, 0 fixes

By area

  • projects/llms.txt — 1 commit

Notable commits

  • change: llms.txt: npx skills install for other agents

Architecture

  • Unchanged — 0 containers · 7 contexts · 8 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

InsertKoinIO/koin was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit d486a5e8748f90db43f939e227083f2bd2c47c12 — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.63+preprod-4a8cc97a9484.