Do we really need to use Dependency Injection Framework?

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/androiddev

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • JetBrains - Developer Ecosystem Survey 2022
  • Scout APM - Less time debugging, more time building
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • Kodein

    Painless Kotlin Dependency Injection

    Now I will finish up saying Hilt is just an opinionated way to dependency injection on Android, but there are simpler frameworks out there such as Koin or Kodein that can help take away a lot of the troubles that can come when you try to make your own framework. Just know that most other frameworks tend to be runtime injection instead of compile time injection like Hilt, which can be helpful to know at compile time if you are missing a dependency in your graph as opposed to runtime when its out in the wild.

  • koin

    Koin - a pragmatic lightweight dependency injection framework for Kotlin

    Now I will finish up saying Hilt is just an opinionated way to dependency injection on Android, but there are simpler frameworks out there such as Koin or Kodein that can help take away a lot of the troubles that can come when you try to make your own framework. Just know that most other frameworks tend to be runtime injection instead of compile time injection like Hilt, which can be helpful to know at compile time if you are missing a dependency in your graph as opposed to runtime when its out in the wild.

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support. Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

  • espresso-kotlin-playground

    Android app that uses the kotlin all open plugin for mocking in espresso tests

    If you're looking for a simple project that shows all of the code changes converting a MVVM app to Hilt, this commit in repository of mine should show that. I should note that this commit also added mockk and the kotlin open compiler to write a mock espresso test which might show you another benefit to writing a hilt android test.

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