# KOtlin DEpendency INjection

**URL:** <https://discuss.kotlinlang.org/t/kotlin-dependency-injection/281>\
**Category:** Uncategorized\
**Created:** [April 16, 2015, 2:14pm UTC](https://discuss.kotlinlang.org/t/kotlin-dependency-injection/281 "2015-04-16T14:14:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![salomonbrys](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/salomonbrys/32/1445_2.png) [@salomonbrys](https://discuss.kotlinlang.org/u/salomonbrys)\
**Post date:** [April 16, 2015, 2:14pm UTC](https://discuss.kotlinlang.org/t/kotlin-dependency-injection/281/1 "2015-04-16T14:14:36Z")

</div>

Hi there,

Since I started using Kotlin, I’ve been frustrated by the lack of proper dependency injection support.  
Dagger 1 & 2 both require some java code (although Dagger 2 requires less of it) and Guice is very expensive both in term of overhead and weight (Guice depends on Guava, which, IMHO, is a problem regarding the 64k method reference limit in Android).

Furthermore, those dependency injection library do not really take advantage of Kotlin’s features.

So, I have created a small dependency injection library. It is very small and will probably not fit the need of huge projects with hundreds of modules and bindings but:  
- It does the job pretty well in my projects.

- It is dependency free and very lightweight.
- It uses kotlin’s features whenever it can, making it very easy to use in Kotlin.

As I said, it is very lightweight (by design) and therefore has less advanced features than Guice or Dagger.  
At least it does dependency binding and injection in a manner that satisfies me.

Here’s the link. I’d love to hear your thoughts if you have a moment to look at it.

[https://github.com/SalomonBrys/Kodein](https://github.com/SalomonBrys/Kodein)
