Yet another DI library, bit this time it's not a service locator

This page summarizes the projects mentioned and recommended in the original post on /r/Kotlin

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • Onboard AI - ChatGPT with full context of any GitHub repo.
  • WorkOS - The modern API for authentication & user identity.
  • dikt

    Simple and powerful DI for kotlin multiplatform

  • kotlin-inject

    Dependency injection lib for kotlin

    Interesting! Author of kotlin-inject here, I had originally looked at writing a compiler plugin and using IR but the lack of documentation and a non-stable api scared me away. Cool that you were able to get it to work.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • motif

    A simple DI API for Android / Java (by uber)

    Looks neat. I'm a maintainer on Uber's Motif and we've been eyeing KSP or compiler plugin support in a future version.

  • Kodein

    Painless Kotlin Dependency Injection

    Long answer: My pain mostly comes from using [Kodein]( and a custom service locator in an iOS/Swift project. Other than that I have very little experience with DI (e.g. I never used Dagger so far), so my opinion might be a little biased. Also, both of these projects are really large, so, in many cases, a class is declared in one module but used in a completely different module and the DI or service locator is sort of the glue between the modules.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts