What is Katana?

Katana is a lightweight, minimalistic dependency injection library (similar to the service locator pattern) for Kotlin on the JVM, designed especially with Android in mind.

Features:

  • Extremely lightweight footprint (only ~15kB in classes and ~130 methods after ProGuard), plain Kotlin, no third-party dependencies
  • It’s fast (also see this comparison)
  • “Less is more”, therefore:
  • No global singleton state. Likelihood of memory leaks is greatly reduced unless YOU are doing something wrong ;P
  • No reflection (see this regarding type erasure)
  • No code generation (unless inline functions count)
  • No dependency overrides possible (see Overrides)

Overview