# koin

Koin is a lightweight dependency injection framework designed for Kotlin.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Resolving Koin Dependencies from Swift - Daniel Bertoldi

DevFeed: [Resolving Koin Dependencies from Swift - Daniel Bertoldi](<https://devfeed.tech/articles/resolving-koin-dependencies-from-swift-daniel-bertoldi-142428.md>)

Original publisher: [Read original article](<https://touchlab.co/resolving-koin-dependencies-from-swift>)

Published: 2026-11-18T18:00:00Z

Content type: tutorial

Language: en

Sources: [Touchlab](<https://devfeed.tech/sources/touchlab-enterprise-mobile-innovation-development.md>)

Topics: [koin](<https://devfeed.tech/topics/koin.md>), [Swift](<https://devfeed.tech/topics/swift.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [apis](<https://devfeed.tech/tags/apis.md>), [arguments](<https://devfeed.tech/tags/arguments.md>), [bridge](<https://devfeed.tech/tags/bridge.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cast](<https://devfeed.tech/tags/cast.md>), [ci](<https://devfeed.tech/tags/ci.md>), [class](<https://devfeed.tech/tags/class.md>), [classes](<https://devfeed.tech/tags/classes.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [construction](<https://devfeed.tech/tags/construction.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [crash](<https://devfeed.tech/tags/crash.md>), [definition](<https://devfeed.tech/tags/definition.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [interface](<https://devfeed.tech/tags/interface.md>), [ios](<https://devfeed.tech/tags/ios.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [swift](<https://devfeed.tech/tags/swift.md>)

### AI overview

Koin's Swift bridge cannot resolve a Kotlin interface by passing its protocol metatype as an Obj-C class: definitions are keyed by the registered interface, and that interface exports as a protocol. For a few dependencies, expose typed Kotlin getter functions; calls remain compile-time checked and are simpler. For broader access, a generic resolver maps Swift class or protocol types back to Kotlin types, then returns an optional value. It requires beta interop APIs and name-based protocol lookup, and missing definitions, construction failures, or mismatched untyped parameters can become nil. Qualifiers still need explicit getters. The article suggests testing Swift-resolved types; it favors getters for a handful of entry points and the resolver when many dependencies must cross into iOS.

### Source excerpt

Asking Koin for an interface from Swift doesn't work the way it does in Kotlin. We'll cover the why and give you two ways to get your dependencies across the bridge.

## Migrating to Koin Compiler with Koin AI Skills

DevFeed: [Migrating to Koin Compiler with Koin AI Skills](<https://devfeed.tech/articles/migrating-to-koin-compiler-with-koin-ai-skills-136662.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/migrating-to-koin-compiler-with-koin-ai-skills-fe704e2af3af?source=rss----925561f2ecdf---4>)

Author: Gabriel Bronzatti Moro

Published: 2026-11-16T13:01:04Z

Content type: tutorial

Language: en

Sources: [Koin developers](<https://devfeed.tech/sources/koin-developers-medium.md>)

Topics: [koin](<https://devfeed.tech/topics/koin.md>), [Agent Skills](<https://devfeed.tech/topics/agent-skills.md>), [DeepSeek Harness](<https://devfeed.tech/topics/dsh.md>), [Android](<https://devfeed.tech/topics/android.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>)

Tags: [agentic-ai](<https://devfeed.tech/tags/agentic-ai.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-assisted](<https://devfeed.tech/tags/ai-assisted.md>), [ai-skills](<https://devfeed.tech/tags/ai-skills.md>), [android](<https://devfeed.tech/tags/android.md>), [code-assistant](<https://devfeed.tech/tags/code-assistant.md>), [code-quality](<https://devfeed.tech/tags/code-quality.md>), [compile](<https://devfeed.tech/tags/compile.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [deepseek](<https://devfeed.tech/tags/deepseek.md>), [deepseek-harness](<https://devfeed.tech/tags/deepseek-harness.md>), [dependency-graph](<https://devfeed.tech/tags/dependency-graph.md>), [dsl](<https://devfeed.tech/tags/dsl.md>), [hybrid](<https://devfeed.tech/tags/hybrid.md>), [ios](<https://devfeed.tech/tags/ios.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [migrate](<https://devfeed.tech/tags/migrate.md>), [migration](<https://devfeed.tech/tags/migration.md>), [minutes](<https://devfeed.tech/tags/minutes.md>), [modules](<https://devfeed.tech/tags/modules.md>), [skills](<https://devfeed.tech/tags/skills.md>)

### AI overview

The author reports migrating StreamPlayer-App from a hybrid Koin setup to a fully compiler-based approach in three minutes using Koin Skills with DeepSeek Harness. The starting app used Koin 4.2.2 and Compiler Plugin 1.2.3 with compileSafety enabled, combining compile-time annotated modules, explicitly loaded DSL modules, and modules attached lazily to navigation destinations. The /di-migration skill produced a 131-step plan and applied changes incrementally, checking Gradle builds and testing affected features in an Android emulator after each step. The account presents this validation cycle as a way to catch issues early and keep the app functional during migration; it does not provide independent performance comparisons or detail the final code changes.

### Source excerpt

Hi friends! 👋 Today, we're going to explore the power of Koin Skills and how they can make real-world development tasks significantly faster and more efficient. Using the Koin Migration Skill, I was able to migrate the StreamPlayer-App from the traditional Koin DSL to the new Koin Compiler in just three minutes. The result? A clean migration, well-structured code, and an impressive turnaround time. In this article, I'll walk you through the entire process, step by step, showing how to use Koin Skills to automate migration tasks while keeping code quality and developer control at the center of the experience. Producing good software with AI -- Image generated by GeminiCurrent Koin Setup in StreamPlayer-App The app currently runs on Koin 4.2.2 with the Koin Compiler Plugin 1.2.3 compileSafety = true without KSP. Its dependency graph follows a hybrid approach: - Annotated modules are discovered at compile time. - Plain DSL modules are loaded explicitly. - A few modules are attached lazily to specific navigation destinations. The application has a single Koin instance, initialized through a shared commonMainfunction, while Android and iOS entry points provide their respective platform-specific dependencies. Let's migrate to Koin Compiler! 📈 Our goal is to migrate this hybrid setup to a fully compiler-based approach, leveraging the powerful AI-assisted tools provided by the Koin team: Koin Skills 🤖. These skills provide specialized workflows that help developers understand existing configurations, automate migration steps, and maintain code quality throughout the process. Let's see how much we can accomplish with them! Install Koin Skills I am using here DeepSeek Harness as a code assistant (provided by DeepSeek), and it was very easy to install the skills I just ask: Install https://github.com/InsertKoinIO/koin-skills on my machine (user level)Run the migration skill Basically we just need to run /di-migration skill in a fresh session. /di-migration migrate to Koin Compi

## Koin Skills: Koin, the Right Way, with Your Agent

DevFeed: [Koin Skills: Koin, the Right Way, with Your Agent](<https://devfeed.tech/articles/koin-skills-koin-the-right-way-with-your-agent-119279.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/koin-skills-koin-the-right-way-with-your-agent-4fe1b49d511c?source=rss----925561f2ecdf---4>)

Author: Arnaud Giuliani

Published: 2026-11-05T09:01:03Z

Content type: release

Language: en

Sources: [Koin developers](<https://devfeed.tech/sources/koin-developers-medium.md>)

Topics: [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [koin](<https://devfeed.tech/topics/koin.md>), [Agent Skills](<https://devfeed.tech/topics/agent-skills.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [dagger-hilt](<https://devfeed.tech/topics/dagger-hilt.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [android](<https://devfeed.tech/tags/android.md>), [android-compose](<https://devfeed.tech/tags/android-compose.md>), [annotations](<https://devfeed.tech/tags/annotations.md>), [compile](<https://devfeed.tech/tags/compile.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compose](<https://devfeed.tech/tags/compose.md>), [crashes](<https://devfeed.tech/tags/crashes.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-2](<https://devfeed.tech/tags/dagger-2.md>), [dependency](<https://devfeed.tech/tags/dependency.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [di](<https://devfeed.tech/tags/di.md>), [diagnose](<https://devfeed.tech/tags/diagnose.md>), [frameworks](<https://devfeed.tech/tags/frameworks.md>), [hilt](<https://devfeed.tech/tags/hilt.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [skills](<https://devfeed.tech/tags/skills.md>)

### AI overview

The Koin plugin for Claude Code provides four skills for setup, writing Koin code, DI migration, and diagnosis, plus an optional Kotzilla MCP server. The skills target Koin 4.x and adapt to Annotations or DSL workflows; the Compiler Plugin is recommended but optional, and checks Koin DSL graphs at build time. Migration from Hilt, Dagger 2, Toothpick, Kodein, or older Koin versions is staged so both containers can coexist while modules move incrementally. Code-level diagnosis works without Kotzilla; runtime investigations such as slow startup, memory issues, duplicate instances, and scope leaks require the Kotzilla SDK for session data. The plugin is built for Claude Code; other agents can use skill archives and configure the MCP endpoint manually.

### Source excerpt

Hello, dear Koin community 👋 AI agents write good Kotlin. With Koin, it's another story: outdated patterns, wrong DI decisions, or a build error fixed without looking at what happens at runtime. Today, I'm happy to share the official Koin skills for AI agents, released as the koin plugin for Claude Code. They help your agent write today's Koin: compile safety for all Koin DSL with Koin Compiler 1.2, migration from Dagger 2, Toothpick and other DI frameworks (Hilt...), and a koin skill that pushes back on DI mistakes. With the Kotzilla MCP Server, included in the plugin, your agent can also investigate how your app really behaves. Let's go through what it does, and how it helps you every day. Your coding agent, now writing today's KoinTL;DR The koin plugin brings four skills and one MCP server. Your agent picks the right one when a task touches dependency injection, and you can always call a skill by name. koin-setup: adds Koin to a new or legacy project (Android, Compose, KMP, Ktor), compile-safe from day one. koin: writes definitions, modules and injection in your project's style, and pushes back on DI mistakes. di-migration: moves you from Hilt, Dagger, Toothpick, or Kodein, one module at a time, while your app keeps shipping. It also upgrades Koin 3.x and Koin KSP projects. koin-diagnose: fixes Koin errors and crashes, and explains slow startup or instances created twice. Kotzilla MCP Server: included and optional. Once you sign in, it brings runtime data from your debug and production sessions. All skills target Koin 4.x and adapt to your project: Koin Annotations, Koin DSL with the Compiler Plugin, or Koin DSL without it. The Compiler Plugin is recommended, never forced. Why skills, why now Ask any AI agent to add Koin to your project today, and there is a good chance you get something like this: // Old Koin generate ... // build.gradle.kts ksp("io.insert-koin:koin-ksp-compiler:1.3.1") // KSP: replaced by the Koin Compiler Plugin // Application startKoin { module

## Migrating a Real Android App to Kotlin Multiplatform 2/4 -- What Moved for Free, and What Hurt

DevFeed: [Migrating a Real Android App to Kotlin Multiplatform 2/4 -- What Moved for Free, and What Hurt](<https://devfeed.tech/articles/migrating-a-real-android-app-to-kotlin-multiplatform-2-4-what-moved-for-free-and-what-hurt-113141.md>)

Original publisher: [Read original article](<https://proandroiddev.com/migrating-a-real-android-app-to-kotlin-multiplatform-2-4-what-moved-for-free-and-what-hurt-7ec973002f01?source=rss----c72404660798---4>)

Author: Daniel Voko

Published: 2026-11-02T14:51:13Z

Content type: article

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [koin](<https://devfeed.tech/topics/koin.md>), [Ktor](<https://devfeed.tech/topics/ktor.md>), [sqldelight](<https://devfeed.tech/topics/sqldelight.md>), [Android](<https://devfeed.tech/topics/android.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [apis](<https://devfeed.tech/tags/apis.md>), [app](<https://devfeed.tech/tags/app.md>), [code](<https://devfeed.tech/tags/code.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [context](<https://devfeed.tech/tags/context.md>), [coupling](<https://devfeed.tech/tags/coupling.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [dependency](<https://devfeed.tech/tags/dependency.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [di](<https://devfeed.tech/tags/di.md>), [files](<https://devfeed.tech/tags/files.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [init](<https://devfeed.tech/tags/init.md>), [interface](<https://devfeed.tech/tags/interface.md>), [kmp](<https://devfeed.tech/tags/kmp.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>)

### AI overview

The author reports that roughly 84% of the app's Kotlin code moved to commonMain, but migration effort depended more on the app's platform coupling than on library support. Ktor's client configuration and request logic moved unchanged; SQLDelight's schema and queries were already platform agnostic, though its web WebWorkerDriver stores data only in memory. Koin modules bind platform implementations to shared interfaces when construction needs platform dependencies; this avoids some expect/actual constraints but makes missing bindings runtime failures. The excerpt recommends building a second target in CI early because Android builds can miss Android-only dependencies leaking into shared code. Replacing pervasive java.time usage was the hardest work: kotlinx-datetime helped, while locale-aware date formatting needed custom implementations using java.time on Android, Intl.DateTimeFormat on wasm, and NSDate on iOS. File uploads use a lazy, repeatable byte-source boundary; Android and iOS can stream, while the web implementation buffers chunks because browser reads are asynchronous and kotlinx-io's RawSource is synchronous. Multiplatform Settings with kotlinx.serialization handles key-

### Source excerpt

Migrating a Real Android App to Kotlin Multiplatform 2/4 -- What Moved for Free, and What HurtPart 2: What Moved for Free, and What Hurt In Part 1 I described the foundations: a modular Android codebase with Ktor, Koin and SQLDelight already in place, and a rule that the Android app must stay shippable after every step. The result is that around 84% of the Kotlin code now lives in commonMain. What that number hides is how unevenly the work was distributed. Some layers moved almost mechanically, in an afternoon, with a plugin swap and a few imports. Others took weeks and touched code I hadn't looked at in years. The pattern turned out to be simple, and in hindsight obvious: multiplatform support in your libraries matters far less than how tightly your own code is coupled to platform APIs. A library either supports KMP or it doesn't, and you find out in minutes. Your own platform coupling is spread across hundreds of files and you find out gradually, for weeks. What moved for freeKoin Dependency injection is the piece I'd underrate if I were writing this list from memory, and it deserves more credit than that. Koin ended up being the mechanism that keeps platform code out of shared code. Instead of reaching for expect / actual every time a component needs a platform implementation, the shared code depends on an interface, and each platform contributes a module that binds it: https://medium.com/media/a9ac7c95779230353cc1e3f0943e48b7/href expect/actual works well for small, self-contained things: a platform name, a formatter, a UUID generator. It gets awkward as soon as a platform implementation needs its own dependencies. The declaration in commonMain fixes the constructor signature for every target, so an Android implementation that needs a Context has to get it some other way, usually through an init step the platform has to remember to call. With a DI module, shared code depends on an interface and nothing else. Each platform binds its own implementation, with whatev

## Koin Compiler 1.2: Compile-Time Safety for ALL Koin DSL

DevFeed: [Koin Compiler 1.2: Compile-Time Safety for ALL Koin DSL](<https://devfeed.tech/articles/koin-compiler-1-2-compile-time-safety-for-all-koin-dsl-22973.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/koin-compiler-1-2-compile-time-safety-for-all-koin-dsl-4603787b9921?source=rss----925561f2ecdf---4>)

Author: Arnaud Giuliani

Published: 2026-09-10T12:01:01Z

Content type: release

Language: en

Sources: [Koin developers](<https://devfeed.tech/sources/koin-developers-medium.md>)

Topics: [koin](<https://devfeed.tech/topics/koin.md>)

Tags: [abi](<https://devfeed.tech/tags/abi.md>), [adapter](<https://devfeed.tech/tags/adapter.md>), [annotation](<https://devfeed.tech/tags/annotation.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [dsl](<https://devfeed.tech/tags/dsl.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-2](<https://devfeed.tech/tags/kotlin-2.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [ktor](<https://devfeed.tech/tags/ktor.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [module](<https://devfeed.tech/tags/module.md>), [modules](<https://devfeed.tech/tags/modules.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [safety](<https://devfeed.tech/tags/safety.md>), [validation](<https://devfeed.tech/tags/validation.md>)

### AI overview

Koin Compiler Plugin 1.2 extends compile-time dependency validation to the reified DSL, `singleOf` constructor DSL, and classic lambda DSL. It checks constructor parameters and qualifiers for constructor registrations; in lambda definitions it checks written `get()` calls but does not infer dependencies from arbitrary lambda code. It also recognizes additional binding and module-composition forms, relays definitions across multiple Gradle `implementation` hops, and validates Ktor `install(Koin)` and `KoinApplication.withConfiguration<T>()` entry points. Limits include no diagnostics for modules without a recognized application entry point, undetected cycles through classic lambda definitions, warnings for runtime-decided module sets, and requiring `@Provided` for runtime-loaded modules. Version 1.2.1 supports Kotlin 2.3.20-2.4.20 and requires Koin 4.2.0 or newer.

### Source excerpt

Hello, dear Koin community 👋 I'm happy to share that Koin Compiler Plugin 1.2 is out, with 1.2.1 already available as the latest patch. Developer mascott unboxing new Koin Features!TL;DR Compile-time validation now works on the Koin application you already have, where before 1.2 it only covered code written specifically for the compiler plugin. Koin DSL -- All now covered! All Koin DSL: the plugin's reified DSL, Koin's constructor DSL (singleOf(::T)), and the classic lambda DSL (single { Foo(get()) }). Across Gradle modules: definitions are now visible two or more implementation hops away. More entry points: Ktor's install(Koin) and KoinApplication.withConfiguration<T>(). One artifact for Kotlin 2.3.20 through 2.4.20. You get there with no migration to a new DSL, and nothing to rewrite. Let's go through what shipped. Covering now all Koin DSL Until now, compile-time safety only covered the plugin's own reified DSL, which means the two DSL styles you have most likely already written were invisible to it. val appModule = module { single<UserService>() // checked singleOf(::UserRepository) // not checked before 1.2 single { AnalyticsHelper(get()) } // not checked before 1.2 } Three ways to declare a definition, and only the first was validated. If your UserRepository needed a Database that no module provided, your build passed and Koin threw at runtime. In 1.2, all three are validated. The two DSL styles get there differently. For the constructor DSL, the referenced constructor's parameters become real requirements, exactly like single<T>(), and any named() qualifier you put on the registration is matched against the consumers that ask for it. The classic lambda DSL works differently. The plugin doesn't try to work out dependencies from free-form lambda code. What it validates instead are the get() calls you wrote inside the lambda, treated as ordinary resolution call sites. Before 1.2 those calls were skipped on purpose, because a hand-written get() is difficult to dis

## Setting Up Koin in real project: A Step-by-Step Guide

DevFeed: [Setting Up Koin in real project: A Step-by-Step Guide](<https://devfeed.tech/articles/setting-up-koin-in-real-project-a-step-by-step-guide-22976.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/setting-up-koin-in-real-project-a-step-by-step-guide-1575e2357239?source=rss----925561f2ecdf---4>)

Author: Gabriel Bronzatti Moro

Published: 2026-09-07T12:01:03Z

Content type: tutorial

Language: en

Sources: [Koin developers](<https://devfeed.tech/sources/koin-developers-medium.md>)

Topics: [koin](<https://devfeed.tech/topics/koin.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [Learning](<https://devfeed.tech/topics/learning.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [catalog](<https://devfeed.tech/tags/catalog.md>), [community](<https://devfeed.tech/tags/community.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [data](<https://devfeed.tech/tags/data.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [football](<https://devfeed.tech/tags/football.md>), [guide](<https://devfeed.tech/tags/guide.md>), [kmp](<https://devfeed.tech/tags/kmp.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [module](<https://devfeed.tech/tags/module.md>), [practical](<https://devfeed.tech/tags/practical.md>), [real-world](<https://devfeed.tech/tags/real-world.md>), [repositories](<https://devfeed.tech/tags/repositories.md>), [share](<https://devfeed.tech/tags/share.md>), [simulator](<https://devfeed.tech/tags/simulator.md>), [team](<https://devfeed.tech/tags/team.md>)

### AI overview

The guide sets up Koin 4.2.2 in a Kotlin Multiplatform app by placing shared dependencies in commonMain and Android-specific dependencies in androidMain and the Android app module. It registers repositories as singletons, use cases as factories, and ViewModels with the Compose ViewModel DSL. A shared startKoin bridge accepts a platform configuration lambda: Android passes its Application context from onCreate(), while iOS uses an empty block and calls initialization from the SwiftUI app launch. Composables obtain ViewModels with koinViewModel() defaults, which the guide says can be overridden with fakes in tests.

### Source excerpt

Hi everyone! 👋 In this article, we'll take a practical, step-by-step approach to setting up Koin in a real-world Kotlin Multiplatform (KMP) project. Instead of starting with an isolated example or a simple Hello World, we'll work with a project created by the CodandoTV community: the World Cup Best Team Simulator. The app allows users to browse football players by country and build their own dream team. It runs on both Android and iOS, using Kotlin Multiplatform for sharing business and data logic, and Compose Multiplatform to share the UI across platforms. Step 1: Add Koin Dependencies Add the Koin libraries to your version catalog: # gradle/libs.versions.toml [versions] koin = "4.2.2" [libraries] koin_core = { group = "io.insert-koin", name = "koin-core", version.ref = "koin" } koin_android = { group = "io.insert-koin", name = "koin-android", version.ref = "koin" } koin_compose = { module = "io.insert-koin:koin-compose", version.ref = "koin" } koin_compose_viewmodel = { module = "io.insert-koin:koin-compose-viewmodel", version.ref = "koin" } In the shared module shared/build.gradle.kts, split the dependencies by source set -- commonMain gets the shared Koin libraries, androidMain gets the Android-specific one: // shared/build.gradle.kts sourceSets { commonMain.dependencies { implementation(libs.koin.core) implementation(libs.koin.compose) implementation(libs.koin.compose.viewmodel) } androidMain.dependencies { implementation(libs.koin.android) } } In the Android app module androidApp/build.gradle.kts , add the Android Koin dependency: // androidApp/build.gradle.kts dependencies { implementation(libs.koin.android) implementation(libs.koin.core) }Step 2: Create the Data Module Create shared/src/commonMain/.../data/DataModule.kt . This module provides singleton instances -- repositories, and data sources that live for the entire app lifecycle. val dataModule = module { single<WorldCupRepository> { WorldCupRepositoryImpl(ioDispatcher = Dispatchers.IO) } }Step 3: Create

## Let Koin Shape your Application Architecture

DevFeed: [Let Koin Shape your Application Architecture](<https://devfeed.tech/articles/let-koin-shape-your-application-architecture-22974.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/let-koin-shape-your-application-architecture-9cd60b1e02b0?source=rss----925561f2ecdf---4>)

Author: Gabriel Bronzatti Moro

Published: 2026-07-06T12:01:01Z

Content type: article

Language: en

Sources: [Koin developers](<https://devfeed.tech/sources/koin-developers-medium.md>)

Topics: [koin](<https://devfeed.tech/topics/koin.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [software-architecture](<https://devfeed.tech/topics/software-architecture.md>), [architecture-components](<https://devfeed.tech/topics/architecture-components.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [scalable-architecture](<https://devfeed.tech/topics/scalable-architecture.md>)

Tags: [application](<https://devfeed.tech/tags/application.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [clean-architecture](<https://devfeed.tech/tags/clean-architecture.md>), [data](<https://devfeed.tech/tags/data.md>), [define](<https://devfeed.tech/tags/define.md>), [domain](<https://devfeed.tech/tags/domain.md>), [dsl](<https://devfeed.tech/tags/dsl.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [ktor](<https://devfeed.tech/tags/ktor.md>), [manage](<https://devfeed.tech/tags/manage.md>), [pattern](<https://devfeed.tech/tags/pattern.md>), [presentation](<https://devfeed.tech/tags/presentation.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [repositories](<https://devfeed.tech/tags/repositories.md>), [software-architecture](<https://devfeed.tech/tags/software-architecture.md>), [use-cases](<https://devfeed.tech/tags/use-cases.md>)

### AI overview

The excerpt presents Koin as the mechanism for defining how application objects are created and managed. Use `@Single` or `single { ... }` for shared instances such as a Ktor `HttpClient`; use `factory` when each request should get a fresh object, illustrated by stateless use cases parameterized with the selected movie ID. Define ViewModels with `viewModel` and inject them with `koinViewModel()`: unlike ordinary factories, their retention follows screen and navigation lifecycle, so they may remain while a screen is on the back stack and survive configuration changes. The guidance is to choose a component's lifetime based on its architectural role; custom scopes are only referenced as a topic covered elsewhere.

### Source excerpt

Hey, friends! 👋 Today we're going to explore application architecture and how Koin can help us build scalable, maintainable applications by applying the principles of Clean Architecture and other software design best practices. Application architecture is a fundamental skill for every software engineer. A well-designed architecture makes applications easier to understand, test, extend, and maintain as they grow over time. A collection of LEGO towers in various stages of construction -- Unsplash by richard_heFoundation When we think about software architecture, we often picture layered diagrams -- data, domain, and presentation -- along with classes such as use cases, handlers, repositories, and helpers. But how do all these components work together? How do we establish a reliable communication protocol between them? Architecture is more than just organizing classes into packages. It's about defining how objects communicate and collaborate working toward a common goal. With that in mind, let's begin our journey with a simple principle: Every object instance should be created by Koin. My only responsibility as a developer is to describe how each object should be instantiated, while Koin takes care of the creation process.SingletonSingleton Café generated by ChatGPT Koin makes it easy to define singletons, whether you're using the @Single annotation or the single { ... } DSL. By declaring a singleton, you're telling Koin to create and manage a single instance of that object for the lifetime of the application. In the example below, we define an HttpClient as a singleton: @Module class NetworkModule { @Single fun provideHttpClient(): HttpClient { return HttpClientBuilder.build( baseUrl = BuildKonfig.HOST, ) } ... } HttpClient is a class provided by Ktor, and it should typically be instantiated only once. By declaring it as a singleton, Koin ensures that the same HttpClient instance is shared throughout the application. The Singleton pattern is commonly used for objects tha

## Custom Scopes in Koin: A Practical Example

DevFeed: [Custom Scopes in Koin: A Practical Example](<https://devfeed.tech/articles/custom-scopes-in-koin-a-practical-example-22968.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/custom-scopes-in-koin-a-practical-example-79cc1188810f?source=rss----925561f2ecdf---4>)

Author: Gabriel Bronzatti Moro

Published: 2026-06-19T12:01:01Z

Content type: tutorial

Language: en

Sources: [Koin developers](<https://devfeed.tech/sources/koin-developers-medium.md>)

Topics: [koin](<https://devfeed.tech/topics/koin.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [application](<https://devfeed.tech/tags/application.md>), [clock](<https://devfeed.tech/tags/clock.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [custom](<https://devfeed.tech/tags/custom.md>), [data-class](<https://devfeed.tech/tags/data-class.md>), [example](<https://devfeed.tech/tags/example.md>), [image](<https://devfeed.tech/tags/image.md>), [instant](<https://devfeed.tech/tags/instant.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [lightweight](<https://devfeed.tech/tags/lightweight.md>), [memory](<https://devfeed.tech/tags/memory.md>), [netflix](<https://devfeed.tech/tags/netflix.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [practical](<https://devfeed.tech/tags/practical.md>), [profile](<https://devfeed.tech/tags/profile.md>), [real-world](<https://devfeed.tech/tags/real-world.md>), [scopes](<https://devfeed.tech/tags/scopes.md>), [state](<https://devfeed.tech/tags/state.md>), [user](<https://devfeed.tech/tags/user.md>), [user-experience](<https://devfeed.tech/tags/user-experience.md>)

### AI overview

The StreamPlayerApp example uses a Koin custom scope to keep the selected profile image available across the app during a user session. `SessionManager` opens a `SessionScope`, declares `UserSessionInfo` with the image URL and change timestamp, retrieves that data through the scope, and closes the scope to clear it. The manager is registered as a Koin factory so it can remain stateless; ViewModels, use cases, and services access session data through it. The supplied excerpt ends partway through the code, so it does not establish full implementation details.

### Source excerpt

Hey friends 👋 Today, we are going to explore how we can create a custom scope, one of the powerful features provided by Koin. To make things practical 🔨, we'll walk through a real-world use case from the open-source project StreamPlayerApp (created by CodandoTV). Wireframes of a mobile app -- Unsplash by @alvarordesignWhat is the problem? StreamPlayerApp is an open-source project that aims to recreate the core experience of Netflix. One of its features allows users to select a profile, similar to the profile selection screen found in streaming platforms. The selected profile image needs to be accessible across the entire application, ensuring a consistent user experience on every screen. Whenever a user changes their profile, the updated image should be immediately reflected throughout the app, allowing all screens to stay synchronized with the current profile selection. Screenshots demonstrating the user profile selection feature.How we solve this problem using Custom Scopes? First, we create a class that represents the scope of a user session: class SessionScope Next, we create a lightweight data class containing only the information that needs to be kept in memory throughout the user session: data class UserSessionInfo( // represents the time user changed the profile val userTimestamp: Instant, // represents the selected picture url val profileImageUrl: String ) We then created a dedicated class responsible for managing the user's session lifecycle and state. class SessionManager { private val scopeId: String = "user_session" /** * Create custom scope and hold the user's session data */ fun openSession(imageUrl: String) { closeSession() val koin = KoinPlatform.getKoin() val scope = koin.createScope<SessionScope>( scopeId = scopeId, ) scope.declare( UserSessionInfo( userTimestamp = Clock.System.now(), profileImageUrl = imageUrl ) ) } /** * Retrieve the current user session */ fun userSessionInfo(): UserSessionInfo? { return KoinPlatform.getKoin() .getScopeOrNull(sc

## Koin Annotations Make expect/actual Obsolete in KMP

DevFeed: [Koin Annotations Make expect/actual Obsolete in KMP](<https://devfeed.tech/articles/koin-annotations-make-expect-actual-obsolete-in-kmp-22971.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/koin-annotations-make-expect-actual-obsolete-in-kmp-5f1445e2055e?source=rss----925561f2ecdf---4>)

Author: Tezov

Published: 2026-06-11T08:48:59Z

Content type: article

Language: en

Sources: [Koin developers](<https://devfeed.tech/sources/koin-developers-medium.md>)

Topics: [koin](<https://devfeed.tech/topics/koin.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [annotation-processor](<https://devfeed.tech/topics/annotation-processor.md>), [interface](<https://devfeed.tech/topics/interface.md>)

Tags: [annotations](<https://devfeed.tech/tags/annotations.md>), [clean-architecture](<https://devfeed.tech/tags/clean-architecture.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [kmp](<https://devfeed.tech/tags/kmp.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlinmultiplatformmobile](<https://devfeed.tech/tags/kotlinmultiplatformmobile.md>)

### AI overview

The article shows a KMP pattern that replaces `expect/actual` with shared interfaces and platform-specific Koin implementations. In `commonMain`, `@ComponentScan` is configured to scan shared packages and the `androidMain` and `iosMain` modules; Android and iOS each provide `@Factory` implementations of the same domain and presentation interfaces. Shared Compose code requests the presentation interface from the current Koin scope, allowing dependency injection to resolve the platform implementation at runtime without shared-code changes or manual wiring. The presentation interface includes a `@Composable` method, which the author says is mainly illustrative and may not suit most projects. The excerpt names Koin compiler 0.6.2 and Compose integration 4.2.1-RC1, but does not provide further setup or compatibility details.

### Source excerpt

Source code available at the end of the article In Kotlin Multiplatform (KMP) projects, expect/actual is traditionally used to handle platform-specific implementations. In a previous story, I showed how to reduce expect/actual to only one per module using Koin DSL. Today, we can go further. With Koin annotations and the Koin compiler, you can completely bypass expect/actual. This method works seamlessly with Compose Multiplatform and lets you maintain a clean architecture while keeping platform-specific logic where it belongs. Previous Story Mastering Koin Annotations with the Koin Compiler Through Unit Tests -> link Next Story I don't know yet-> coming soon Setting the Stage Inside commonMain, Koin is initialized like this: @Module @ComponentScan( "com.tezov.store.shared.di", "com.tezov.store.shared.data", "com.tezov.store.shared.domain", "com.tezov.store.shared.presentation" ) class SharedModule @KoinApplication(modules = [SharedModule::class]) class SharedApplication val koinConfiguration = koinConfiguration<SharedApplication> { /* nothing here for the demo */ } I'm using: koinCompiler = "0.6.2" koinCompose = "4.2.1-RC1" koinComposeAnnotation = "4.2.1-RC1" The important part here is the @ComponentScan. Koin doesn't just scan commonMain. It also scans the platform modules: androidMain and iosMain. That detail is key because it lets Koin find all implementations without any manual wiring. Defining Contracts in commonMain Instead of expect, we define interfaces for domain and presentation layers. Domainpackage com.tezov.store.shared.domain interface PlatformDomainProtocol { fun description(): String }Presentationpackage com.tezov.store.shared.presentation import androidx.compose.runtime.Composable interface PlatformPresentationProtocol { @Composable fun ComposableFromPlatform() } Yes, you can even include a @Composable in an interface. This is powerful: your shared code can remain clean while delegating platform-specific behavior entirely to the DI container. When usi

## How to use Koin Compiler in a Multimodule Project?

DevFeed: [How to use Koin Compiler in a Multimodule Project?](<https://devfeed.tech/articles/how-to-use-koin-compiler-in-a-multimodule-project-22969.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/how-to-use-koin-compiler-in-a-multimodule-project-6bd8e57d5e4b?source=rss----925561f2ecdf---4>)

Author: Gabriel Bronzatti Moro

Published: 2026-06-11T08:47:55Z

Content type: tutorial

Language: en

Sources: [Koin developers](<https://devfeed.tech/sources/koin-developers-medium.md>)

Topics: [koin](<https://devfeed.tech/topics/koin.md>), [gradle-plugin](<https://devfeed.tech/topics/gradle-plugin.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [Dependency management](<https://devfeed.tech/topics/dependency-management.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [multi-module-project](<https://devfeed.tech/tags/multi-module-project.md>)

### AI overview

The article's example migrates a Compose Multiplatform project from Koin Annotations with KSP to the Koin Compiler, applying it incrementally through a Gradle convention plugin. The stated prerequisites are Kotlin 2.3.x or higher with K2 and Koin 4.2.x or higher. Add the compiler Gradle plugin dependency to the version catalog and build logic, then create a convention plugin that applies `io.insert-koin.compiler.plugin`, enables `userLogs` and `compileSafety`, and adds Koin core and annotations dependencies. Apply the convention plugin to each module being migrated, including the app module. Since compiler migration removes KSP-generated module objects, update initialization to use the compiler-provided `module<DomainModule>()` and `lazyModules(...)` extensions. The author reports reducing custom Gradle plugin code from about 80 lines to about 30 and describes compile-time safety through K2 without KSP code generation.

### Source excerpt

Hey everyone! Today we're diving into how to use the Koin Compiler in a Compose Multiplatform multi-module project. In the previous article, we explored how to migrate a multimodule setup to Koin Annotations, using a convention Gradle plugin to move forward in small, safe steps. We'll follow that same approach diving deep into a project called MovieDB-App👋 A sticky note attached to a wall with the words "how to" written on it - Unsplash by walls_ioFirst step: Update your project, if necessary 🚀 Your project is eligible to support the Koin Compiler if it meets at least the following requirements: ✅ Kotlin 2.3.x or higher (K2 is required) ✅ Koin 4.2.x or higher Our sample project is using the following stack overview: 🤖 AGP: 9.1.0 🧩 Kotlin: 2.3.20 💉 Koin: 4.2.1 🏷 Koin Annotations: 2.3.1 Second step: Configure Koin compiler dependency Let's add our Koin Compiler dependency into the libs.versions.toml : #gradle/libs.versions.toml [versions] koin-compiler-plugin = "1.0.0" ... [libraries] koin-compiler-plugin = { group = "io.insert-koin", name = "koin-compiler-gradle-plugin", version.ref = "koin-compiler-plugin" } Now, let's run Gradle Sync 🐘 Our mission is to create a conventional plugin in our build-logic so we can migrate the project module by module, taking small and safe steps along the way. To achieve that let's add the koin compiler dependency as a depency of our build-logic: // build-logic/build.gradle.kts ... dependencies { implementation(libs.koin.compiler.plugin) } After syncing Gradle, it's time to create our conventional plugin: // build-logic/src/main/kotlin/plugins/KoinCompilerSetupPlugin.kt package plugins import org.gradle.accessors.dm.LibrariesForLibs import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.dependencies import org.gradle.kotlin.dsl.the import org.koin.compiler.plugin.KoinGradleExtension // Ref: https://github.com/InsertKoinIO/koin-compiler-plugin/blob/main/docs/CASE_S

## Koin Compiler 1.0: DSL and Annotations, Koin now Compile-Safe

DevFeed: [Koin Compiler 1.0: DSL and Annotations, Koin now Compile-Safe](<https://devfeed.tech/articles/koin-compiler-1-0-dsl-and-annotations-koin-now-compile-safe-22972.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/koin-compiler-1-0-dsl-and-annotations-koin-now-compile-safe-06905a2b04ad?source=rss----925561f2ecdf---4>)

Author: Arnaud Giuliani

Published: 2026-06-03T12:01:01Z

Content type: release

Language: en

Sources: [Koin developers](<https://devfeed.tech/sources/koin-developers-medium.md>)

Topics: [koin](<https://devfeed.tech/topics/koin.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [annotation-processor](<https://devfeed.tech/topics/annotation-processor.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [annotations](<https://devfeed.tech/tags/annotations.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [dependency-graph](<https://devfeed.tech/tags/dependency-graph.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [dsl](<https://devfeed.tech/tags/dsl.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [plugin](<https://devfeed.tech/tags/plugin.md>)

### AI overview

Koin Compiler 1.0 adds a native Kotlin compiler plugin that checks dependency wiring at build time and rewrites compact DSL calls such as `single<MyRepository>()` into constructor factories. It supports both DSL and annotation-based definitions, validates missing dependencies and runtime resolution call sites, and handles nullable, lazy, list, defaulted, qualified, and injected parameters according to Koin's resolution rules. The plugin requires Kotlin 2.3.20+ and Koin 4.2.1+; it needs no KSP or generated files and is described as supporting Kotlin Multiplatform targets. For DSL use, `koin-core` alone suffices; `koin-annotations` is needed for annotated classes or the annotations flow. Existing Koin modules can adopt the new forms incrementally, while KSP users remove generated-code setup. The excerpt also describes compatibility with JSR-330/Jakarta annotations for staged Dagger or Hilt migration. Safety coverage expands from individual modules to configuration groups, the full graph at `startKoin<T>()`, and call sites; externally provided types require whitelisting or `@Provided`.

### Source excerpt

Koin Compiler 1.0: DSL and Annotations, Now Compile-Safe Hello, dear Koin Community 👋 Koin Compiler 1.0 is out. Koin's DSL and annotations now sit on a native Kotlin compiler plugin that verifies your dependency graph at build time: the missing-definition error that used to wait for a get<T>() call no longer makes it past gradlew build: e: [Koin] Missing dependency: UserRepository (required by UserService) No KSP, no generated files, full Kotlin Multiplatform support out of the box. It's the biggest ergonomic shift we've made in Koin's nine-year history. Koin Logo with KotlinConf '26 LogoSetup 👀 If you use a Gradle version catalog (the modern default): [versions] koin = "4.2.1" koin-plugin = "1.0.0" [libraries] koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" } koin-annotations = { module = "io.insert-koin:koin-annotations", version.ref = "koin" } [plugins] koin-compiler = { id = "io.insert-koin.compiler.plugin", version.ref = "koin-plugin" } Or the equivalent inline in build.gradle.kts: plugins { id("io.insert-koin.compiler.plugin") version "1.0.0" } dependencies { implementation("io.insert-koin:koin-core:4.2.1") implementation("io.insert-koin:koin-annotations:4.2.1") } koin-annotations is only needed if you use the annotations on your classes for the constructor, or use the annotations flow. On the DSL flow, the plugin works against koin-core alone. The DSL flow -- Safer DSL ✨ Take two classes: class MyDatabase() class MyRepository(val db: MyDatabase) Wiring them up with Koin has progressively required less typing: // 1. Manual -- the wiring is explicit module { single { MyDatabase() } single { MyRepository(get()) } } // 2. Reflection-free constructor binding module { singleOf(::MyDatabase) singleOf(::MyRepository) } // 3. Compiler-intercepted - same DSL, new mechanism module { single<MyDatabase>() single<MyRepository>() } The third form looks like nothing is happening. That's the point: the compiler plugin sees single<MyDatabase>(), walks the

## Introducing the Koin Migration Skills

DevFeed: [Introducing the Koin Migration Skills](<https://devfeed.tech/articles/introducing-the-koin-migration-skills-22970.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/introducing-the-koin-migration-skills-0b4be9c819cc?source=rss----925561f2ecdf---4>)

Author: Arnaud Giuliani

Published: 2026-04-22T13:23:59Z

Content type: release

Language: en

Sources: [Koin developers](<https://devfeed.tech/sources/koin-developers-medium.md>)

Topics: [koin](<https://devfeed.tech/topics/koin.md>), [dagger-hilt](<https://devfeed.tech/topics/dagger-hilt.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [bridging](<https://devfeed.tech/tags/bridging.md>), [claude](<https://devfeed.tech/tags/claude.md>), [claude-code](<https://devfeed.tech/tags/claude-code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-hilt](<https://devfeed.tech/tags/dagger-hilt.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [di](<https://devfeed.tech/tags/di.md>), [dsl](<https://devfeed.tech/tags/dsl.md>), [github](<https://devfeed.tech/tags/github.md>), [hilt](<https://devfeed.tech/tags/hilt.md>), [human-in-the-loop](<https://devfeed.tech/tags/human-in-the-loop.md>), [install](<https://devfeed.tech/tags/install.md>), [inventory](<https://devfeed.tech/tags/inventory.md>), [kodein](<https://devfeed.tech/tags/kodein.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [ksp](<https://devfeed.tech/tags/ksp.md>), [mapping](<https://devfeed.tech/tags/mapping.md>), [migration](<https://devfeed.tech/tags/migration.md>), [skills](<https://devfeed.tech/tags/skills.md>)

### AI overview

The Koin Migration Skill is an open-source Claude Code plugin for moving Kotlin and Android projects to Koin 4.x, with the Koin Compiler Plugin when possible. It supports migrations from Hilt, Dagger, Toothpick, Kodein, older Koin versions, classic Koin DSL, and Koin KSP annotations. It inventories modules and bindings, ranks them by complexity and dependencies, then recommends a leaf-first sequence. Migrations proceed module by module, with the old container kept alongside Koin and Hilt bindings bridged through koin-android-dagger or @EntryPoint bridges. Before editing files, the skill presents a plan and asks about key choices, including whether to make a project-wide Kotlin version update or use Safe DSL without the compiler plugin. Its stated safeguards include per-module, configuration-group, and full-graph compile-time checks, which can be temporarily disabled. The excerpt also notes KMP support and modern Koin conventions.

### Source excerpt

Hello all 👋 Migrating a Kotlin or Android project between DI frameworks (Hilt, Dagger, Toothpick, Kodein, or older Koin versions) is one of those strategic refactors that every team puts off. It touches every module, the call sites are everywhere, and the migration plan never quite survives contact with the real codebase. We wanted to take the pain out of it. So we built the Koin Migration Skill: a Claude Code plugin that automates DI migrations to Koin 4.x and the Koin Compiler Plugin, module by module, with compile-time verification and a human-in-the-loop at every step. Koin Migration Project -- 1.0.0What it covers Initially, this project is intended to help Koin developers to migrate to use the new Koin Compiler Plugin. The skill supports every realistic migration path into modern Koin, with Koin Compiler if possible. This uses either annotations or the safe DSL: Hilt -> Koin (with koin-android-dagger bridging during migration) Dagger -> Koin Toothpick -> Koin Kodein -> Koin Koin 3.x -> Koin 4.x upgrade Classic Koin DSL -> Safe DSL Koin KSP Annotations -> Koin Compiler Plugin All paths converge on the same target: Koin 4.x with Annotations or Safe DSL, powered by the Koin Compiler Plugin for compile-time DI graph verification. How it works Project documentation is available: https://github.com/InsertKoinIO/koin-migration. Point Claude at your project and describe what you want to migrate. /plugin marketplace add InsertKoinIO/koin-migration /plugin install koin-migration@koin-migrationAdding Skill in current project The skill opens with a full inventory of your DI setup: every module, binding, qualifier, and scope. It immediately produces a ranked migration table. The NowInAndroid project below has 35 DI files across core, feature, app, and sync layers. The skill maps each one: bindings count, downstream dependants, complexity rating, and a recommended order. Modules inventory, DI features usage and mapping You can't go "big-bang" in that kind of approach. You need to st

## Unlocking Koin Compile Safety -- Koin Compiler Plugin 1.0.0-RC1

DevFeed: [Unlocking Koin Compile Safety -- Koin Compiler Plugin 1.0.0-RC1](<https://devfeed.tech/articles/unlocking-koin-compile-safety-koin-compiler-plugin-1-0-0-rc1-22977.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/unlocking-koin-compile-safety-6278840ab171?source=rss----925561f2ecdf---4>)

Author: Arnaud Giuliani

Published: 2026-04-14T08:08:36Z

Content type: release

Language: en

Sources: [Koin developers](<https://devfeed.tech/sources/koin-developers-medium.md>)

Topics: [koin](<https://devfeed.tech/topics/koin.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>)

Tags: [3](<https://devfeed.tech/tags/3.md>), [allowed](<https://devfeed.tech/tags/allowed.md>), [android](<https://devfeed.tech/tags/android.md>), [annotations](<https://devfeed.tech/tags/annotations.md>), [build](<https://devfeed.tech/tags/build.md>), [call](<https://devfeed.tech/tags/call.md>), [candidate](<https://devfeed.tech/tags/candidate.md>), [codegen](<https://devfeed.tech/tags/codegen.md>), [compile](<https://devfeed.tech/tags/compile.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [container](<https://devfeed.tech/tags/container.md>), [dependency](<https://devfeed.tech/tags/dependency.md>), [dependency-graph](<https://devfeed.tech/tags/dependency-graph.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [developer-experience](<https://devfeed.tech/tags/developer-experience.md>), [di](<https://devfeed.tech/tags/di.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [safety](<https://devfeed.tech/tags/safety.md>)

### AI overview

Koin Compiler Plugin 1.0.0-RC1 adds build-time dependency graph checks, constructor auto-wiring, and call-site validation for both DSL and annotations, requiring Kotlin 2.3.20 and Koin 4.2.1. Module checks catch visible missing dependencies, qualifier mismatches, and scope violations; validation at startKoin<T>() assembles and checks the full graph, including cross-module definitions. Calls such as get<T>(), inject<T>(), and koinViewModel<T>() are also checked. The plugin reuses Koin's runtime container and performs thin IR wiring, with the article reporting a few extra seconds of build time and little generated code. Compared with Metro, the article describes Koin as lighter in compiler code generation and less dependent on graph and factory architecture; it also reports Metro's non-JVM limitations from its documentation. The release is a release candidate, and compile safety can be disabled for migration.

### Source excerpt

Koin Compiler Plugin 1.0.0-RC1 -- Unlocking Compile-Safe Dependency Injection for Kotlin & KMP Hello Koin Community 👋 Compile-time safety has been one of the most requested features by the community. For years, verifying your Koin dependency graph required runtime tools with checkModules()and verify()in your test suite. They run after compilation. If something is missing, you find out in test results, not at build time. It's now time for new generation of tools for Koin. My Linkedin post for AndroidMakers Last week at Android Makers (Paris, France), we announced Koin Compiler Plugin 1.0.0-RC1! This release candidate brings compile-time safety, constructor auto-wiring, and a unified developer experience for both DSL and Annotations, all powered by a native Kotlin Compiler Plugin. Aligned with Koin 4.2.1 and Kotlin 2.3.20. Check out the roadmap and documentation to get started. Dependency graph validation is done in the Koin Compiler Plugin itself: your graph is verified as part of the build (no need to run tests). DSL, annotations, and even individual call sites are checked. The Kotlin compiler plugin ecosystem has matured, and new DI approaches are emerging. Koin's answer is straightforward: lighter Compiler codegen, an existing runtime container, and validation by design of the compilation. Koin Compiler Plugin -- 1.0.0-RC1Check the online Koin documentation for further information: https://insert-koin.io/docs/intro/koin-compiler-plugin We are also gathering some "playground apps" to showcase different scenarios of Koin Compiler Usages (https://github.com/InsertKoinIO/playground-apps) Koin Compiler Plugin Setup 🔎 Below, you will find the minimum versions of Koin & Koin Compiler Plugin that are allowed to enable compile safety (note that you need Kotlin 2.3.20): [versions] kotlin = "2.3.20" koin = "4.2.1" koin-plugin = "1.0.0-RC1" [libraries] koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" } # if using annotations koin-annotations = { module =

## 51 Detekt Rules for Koin: Catch Anti-Patterns Your Compiler Misses

DevFeed: [51 Detekt Rules for Koin: Catch Anti-Patterns Your Compiler Misses](<https://devfeed.tech/articles/51-detekt-rules-for-koin-catch-anti-patterns-your-compiler-misses-25957.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/detekt-rules-koin-c0b6330fc37b?source=rss-7a0a233f88a2------2>)

Author: Kirill Rozov

Published: 2026-03-02T08:17:18Z

Content type: article

Language: en

Sources: [Kirill Rozov](<https://devfeed.tech/sources/stories-by-kirill-rozov-on-medium.md>)

Topics: [koin](<https://devfeed.tech/topics/koin.md>), [detekt](<https://devfeed.tech/topics/detekt.md>), [Continuous integration](<https://devfeed.tech/topics/continuous-integration.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [detekt](<https://devfeed.tech/tags/detekt.md>), [dsl](<https://devfeed.tech/tags/dsl.md>), [factory](<https://devfeed.tech/tags/factory.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [rules](<https://devfeed.tech/tags/rules.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [scope](<https://devfeed.tech/tags/scope.md>), [semantics](<https://devfeed.tech/tags/semantics.md>), [static-analysis](<https://devfeed.tech/tags/static-analysis.md>)

### AI overview

The article presents detekt-rules-koin as a Detekt extension with 51 rules for Koin 4.x, intended to catch runtime wiring mistakes that ordinary compilation and generic Detekt checks may miss. Examples include flagging get() or inject() outside safe module contexts, KoinComponent use in business logic, singleton registrations for types such as use-cases, ViewModels registered as singletons, and Koin calls inside Compose previews. It also describes 12 Koin Annotations rules for issues such as missing @Module declarations and conflicting unqualified bindings. Installation uses a detektPlugins dependency; all rules are active by default, can be tuned in detekt.yml, and can be suppressed individually. The article says the checks run through the existing ./gradlew detekt command with no runtime overhead.

### Source excerpt

Your Koin module compiles. Unit tests pass. CI is green. Then production crashes with NoBeanDefFoundException on first launch -- and the offending line has been sitting in your codebase for weeks. Koin's runtime graph resolution means the compiler never sees these bugs; it only surfaces them when Koin tries to wire everything together. No red underlines, no warnings, no build failures -- just a crash on a user's device. This is the fundamental tension with Koin: its DSL is concise and readable, but none of the structure it creates is visible to the type system. The three examples below compile without errors on any Android project. All three will cause real problems at runtime. Static analysis is the standard answer to this class of problem -- but generic Detekt rules were not written with Koin's semantics in mind. A rule that flags unused variables or improper nullability checks has no concept of a Koin scope, a module definition block, or the difference between single and factory. What you need is a rule set that understands Koin. That's exactly what detekt-rules-koin provides. Problem 1 -- `NoGetOutsideModuleDefinition`// ❌ get() called outside a Koin module - compiles, crashes at runtime class UserRepositoryImpl : UserRepository { // KoinComponent not implemented, no scope active private val db: AppDatabase = get() private val api: UserApi = get() } get() is only valid inside a Koin module definition block, where the Koin container is active and providing dependencies. Calling it here triggers IllegalStateException: KoinApplication has not been started -- or silently resolves to the wrong scope -- depending on how your app is wired. Problem 2 -- NoKoinComponentInterface// ❌ Repository using Service Locator via KoinComponent class UserRepository : KoinComponent { private val db: AppDatabase by inject() private val api: UserApi by inject() fun getUser(id: String) = api.fetchUser(id) }// ✅ Constructor injection - dependencies are explicit and testable class UserRepository

## Re: Dependency Injection vs. Service Locators

DevFeed: [Re: Dependency Injection vs. Service Locators](<https://devfeed.tech/articles/re-dependency-injection-vs-service-locators-39043.md>)

Original publisher: [Read original article](<https://www.zacsweers.dev/re-dependency-injection-vs-service-locators/>)

Author: Zac Sweers

Published: 2026-02-20T05:10:16Z

Content type: opinion

Language: en

Sources: [Zac Sweers](<https://devfeed.tech/sources/zac-sweers.md>)

Topics: [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [koin](<https://devfeed.tech/topics/koin.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [service](<https://devfeed.tech/topics/service.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>)

Tags: [dagger](<https://devfeed.tech/tags/dagger.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [metro](<https://devfeed.tech/tags/metro.md>), [service](<https://devfeed.tech/tags/service.md>)

### AI overview

The article compares dependency injection frameworks with service locators, focusing on compile-time validation, testing, isolation, generated performance, and the tradeoff of requiring more explicit code. It discusses Metro, Dagger, Hilt, Anvil, kotlin-inject, Koin, and manual dependency injection.

### Source excerpt

This is a port of a write-up I did in the Kotlin Lang slack here in response to the question "Dagger vs. Hilt vs. Koin vs. Metro vs. <what comes next>. Serious question: Are there any compelling reasons to switch from Koin to Metro in a

## Going Fully Multiplatform #1: Migrating your Android Project to Kotlin Multiplatform

DevFeed: [Going Fully Multiplatform #1: Migrating your Android Project to Kotlin Multiplatform](<https://devfeed.tech/articles/going-fully-multiplatform-1-migrating-your-android-project-to-kotlin-multiplatform-25912.md>)

Original publisher: [Read original article](<https://medium.com/@xxfast/going-fully-multiplatform-1-migrating-your-android-project-to-kotlin-multiplatform-8fc38763307?source=rss-43bae76e8f81------2>)

Author: Isuru Rajapakse

Published: 2021-10-21T13:24:07Z

Content type: article

Language: en

Sources: [Isuru Rajapakse](<https://devfeed.tech/sources/stories-by-isuru-rajapakse-on-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [koin](<https://devfeed.tech/topics/koin.md>), [Ktor](<https://devfeed.tech/topics/ktor.md>), [sqldelight](<https://devfeed.tech/topics/sqldelight.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [caching](<https://devfeed.tech/tags/caching.md>), [compose](<https://devfeed.tech/tags/compose.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [declarative](<https://devfeed.tech/tags/declarative.md>), [declarative-ui](<https://devfeed.tech/tags/declarative-ui.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [imperative](<https://devfeed.tech/tags/imperative.md>), [ios](<https://devfeed.tech/tags/ios.md>), [jetbrains](<https://devfeed.tech/tags/jetbrains.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [ktor](<https://devfeed.tech/tags/ktor.md>), [moshi](<https://devfeed.tech/tags/moshi.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [project](<https://devfeed.tech/tags/project.md>)

### AI overview

The author describes migrating a long-running Android-only app, targeting Android, JVM, iOS, and web. The existing stack uses OkHttp and Retrofit for networking, Moshi for serialization, Okio for caching, Koin, RxJava, Conductor, and XML Android Views. The planned multiplatform stack replaces these with Ktor, Kotlin Serialization, SQLDelight, Coroutine Flows, Decompose, and declarative UI with Jetpack/JetBrains Compose; Koin remains. The excerpt presents this as a plan and says later articles will cover the steps and project modularization, so it does not establish implementation results.

### Source excerpt

Earlier this year I started a mission to start migrating one of our long-lasting Android-only apps to Kotlin Multiplatform to go beyond just Android. This is the story of how that went. Migration from Only-Android to Kotlin Multiplatform!The Android stack This is our current "stack" our android app was set up as follows Targeting Android SDK API 23 or above, we had a few libraries to help us out. The Android-only stack OkHttp for Networking Retrofit for.. also Networking Moshi for serialisation Okio for caching Koin for Dependency Injection/ Service Locator Plumbing with RxJava Navigation with Conductor Imperative UI with Android Views written in XML The Multiplatform stack To go beyond just Android, I had to make some hard decisions to step outside of the comfort zone that we've been so fond of To target Android, JVM, iOS and Web -- we will be making use of The Multiplatform stack Ktor for Networking Kotlin Serialisation for.. serialisation Caching with SQLDelight Koin for Dependency Injection (that one can stay) Plumbing with Coroutine Flows Navigation with Decompose Declarative UI powered with Jetpack/Jetbrains Compose That's the plan! In the next few articles, we'll take a look at each step in more detail. Before jumping on to that -- I want to take a close look at how we can fully modularise a Kotlin Multiplatform project with Going Fully Multiplatform #2 Modularising your Kotlin Multiplatform Project!

## Koin and Dagger for dependency injection on Android

DevFeed: [Koin and Dagger for dependency injection on Android](<https://devfeed.tech/articles/koin-for-dependency-injection-on-android-is-dagger-dead-27174.md>)

Original publisher: [Read original article](<https://antonioleiva.com/koin-vs-dagger>)

Published: 2019-06-13T00:00:00Z

Content type: tutorial

Language: en

Sources: [Antonio Leiva](<https://devfeed.tech/sources/antonio-leiva.md>)

Topics: [koin](<https://devfeed.tech/topics/koin.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [Android](<https://devfeed.tech/topics/android.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>)

### AI overview

A video explains why dependency injection is useful on Android, compares Dagger with Koin, and demonstrates how to start using Koin in a complete example.

### Source excerpt

Everything Android, Kotlin and other random topics