Skip to content

Migrate dependency injection from Kodein to Koin#33

Closed
AlexGladkov wants to merge 2 commits into
mainfrom
feature/change-kodein-to-koin-40cc0cbf
Closed

Migrate dependency injection from Kodein to Koin#33
AlexGladkov wants to merge 2 commits into
mainfrom
feature/change-kodein-to-koin-40cc0cbf

Conversation

@AlexGladkov

Copy link
Copy Markdown
Owner

Summary

  • Migrated all dependency injection modules from Kodein to Koin
  • Updated all DI module definitions across the codebase (CoreModule, DatabaseModule, FeatureModule, and all feature-specific modules)
  • Updated ProGuard rules to reflect Koin configuration
  • Updated documentation (README.md and IMPLEMENTATION_STATUS.md) to reference Koin instead of Kodein

Changes

  • Replaced Kodein dependency with Koin in gradle/libs.versions.toml and composeApp/build.gradle.kts
  • Converted all DI.Module definitions to Koin's module {} syntax
  • Updated all bind<T>() with provider/singleton/factory {} calls to Koin's DSL
  • Migrated platform-specific DI initialization (Android, iOS, Desktop)
  • Updated ProGuard rules for Koin obfuscation rules

Testing

All modules have been migrated and the codebase compiles successfully with the new Koin framework.

🤖 Generated with Claude Code

claude and others added 2 commits January 30, 2026 09:19
Replace Kodein DI framework with Koin 4.0.1 across the entire codebase.
This migration modernizes the DI approach and aligns with current Kotlin
Multiplatform best practices.

Changes:
- Update gradle dependencies: Replace kodein-di with koin-core, koin-compose,
  koin-compose-viewmodel, and koin-android
- Migrate all DI modules to Koin syntax:
  - Replace DI.Module() with module {}
  - Replace bind<T>() with singleton with single<T> {}
  - Replace bind<T>() with provider with factory<T> {}
  - Replace instance() with get()
  - Replace importAll() with includes()
- Update PlatformSDK to use Koin API:
  - Replace DirectDI with Koin
  - Replace DI.direct with startKoin().koin
- Update platform-specific providers for Android, iOS, and JVM
- Maintain backward compatibility with existing injection points through
  the Inject helper object

All existing ViewModels and use cases continue to work without changes
through the maintained Inject.instance() API.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Update ProGuard rules to use Koin instead of Kodein
- Update README.md tech stack to reference Koin
- Update IMPLEMENTATION_STATUS.md documentation
- Remove unused import in DatabaseModule
- Add safety check to prevent multiple Koin initialization

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants