# Migrating from Koin DSL to Koin Annotations in a Multimodule Project: A Step-by-Step Guide

DevFeed: [Migrating from Koin DSL to Koin Annotations in a Multimodule Project: A Step-by-Step Guide](<https://devfeed.tech/articles/migrating-from-koin-dsl-to-koin-annotations-in-a-multimodule-project-a-step-by-step-guide-22975.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/migrating-from-koin-dsl-to-koin-annotations-in-a-multimodule-project-a-step-by-step-guide-a38a82f56e17?source=rss----925561f2ecdf---4>)

Author: Gabriel Bronzatti Moro

Published: 2026-04-24T07:18:23Z

Content type: tutorial

Language: en

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

Topics: [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [Code generation](<https://devfeed.tech/topics/code-generation.md>)

Tags: [code-generation](<https://devfeed.tech/tags/code-generation.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [guide](<https://devfeed.tech/tags/guide.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [ksp](<https://devfeed.tech/tags/ksp.md>), [multi-module-project](<https://devfeed.tech/tags/multi-module-project.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

A step-by-step tutorial for migrating a Compose Multiplatform multimodule project from Koin DSL to Koin Annotations. It covers adding Koin Annotations and KSP dependencies, creating a Gradle convention plugin, enabling the setup in a module, and replacing manual Koin definitions with annotation-based registration.

## Source excerpt

Hey friends 👋 Today we're going to explore how to migrate a Compose Multiplatform multi-module project from Koin DSL to Koin Annotations. We'll take a hands-on approach, diving deep into a project example built by the CodandoTV community. ⚠ In this tutorial, we won't cover the new Koin compiler. It's a significant improvement that simplifies much of the complexity we currently deal with when using KSP, but it deserves its own dedicated deep dive. A person's hand fitting a piece into a puzzle -- Unplash by rosssneddonFirst step: Setup Koin Annotations dependency First thing is let's make sure we are running the latest version of Koin. For that, visit our documentation. After that, let's add our Koin Annotations dependency into the libs.versions.toml . // gradle/libs.versions.toml [versions] koin-annotations = "<latest-version>" ksp = "<latest-version>" ... [libraries] ... com-google-devtools-ksp-gradle-plugin = { module = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" } koin-annotations = { module = "io.insert-koin:koin-annotations", version.ref = "koin-annotations" } koin-ksp-compiler = { module = "io.insert-koin:koin-ksp-compiler", version.ref = "koin-annotations" } KSP is also required, as it enables the code generation used by Koin Annotations. After adding the dependencies, run a Gradle sync to make them available to the project. Let's make sure we have the ksp plugin enabled in the root gradle project: // root/build.gradle.kts plugins { alias(libs.plugins.ksp) apply false ... } Let's head over to the build-logic folder and encapsulate all this setup inside a new Gradle convention plugin. To make this work, we need to add KSP as a library dependency: // build-logic/build.gradle.kts ... dependencies { implementation(libs.com.google.devtools.ksp.gradle.plugin) } Again, let's run Gradle sync 🐘 Second step: Create your conventional Gradle Plugin Inside of your build-logic , let's create a new custom plugin, we can call it com.st