Skip to main content
Version: 4.2

Setting Up Koin

This guide covers everything you need to add Koin to your project.

Quick Setup

Choose your platform to get started:

PlatformPackageGuide
Kotlin/JVMkoin-coreGradle Setup
Androidkoin-androidGradle Setup
Android + Jetpack Composekoin-android + koin-composeGradle Setup
Compose Multiplatformkoin-composeGradle Setup
Kotlin Multiplatformkoin-coreGradle Setup
Ktorkoin-ktorGradle Setup

For the best experience, we recommend:

  1. Use the Koin BOM - Manages all Koin library versions
  2. Use the Koin Compiler Plugin - Provides compile-time safety

See the Compiler Plugin Setup Guide for detailed instructions.

Setup Guides

Gradle Setup

Complete dependency configuration for all platforms:

  • Koin BOM (recommended)
  • Version catalogs
  • Platform-specific packages
  • Testing dependencies

Compiler Plugin Setup

Detailed guide for the Koin Compiler Plugin:

  • Gradle plugin configuration
  • Configuration options
  • Kotlin version requirements
  • Troubleshooting

KSP Annotations Setup (Deprecated)

Legacy setup for KSP-based annotations:

  • ⚠️ Deprecated - migrate to Compiler Plugin
  • Migration guide included

Version Compatibility

Koin VersionKotlin VersionCompiler Plugin
4.2.x2.3+✅ Recommended
4.1.x2.1/2.2+⚠️ KSP only
4.0.x1.9/2.0+⚠️ KSP only
3.5.x1.8+❌ Not available

Current Version

  • Koin: Maven Central
  • Koin Compiler Plugin: Maven Central

Find all Koin packages on Maven Central.

Next Steps

After setup: