Best Practices Kotlin Dagger Module with @Binds and @Provides

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • Dagger2

    A fast dependency injector for Android and Java.

  • I am working on a new project where I'm using Hilt and Kotlin. I've come across the problem of creating dagger modules with kotlin that contain both Binds and Provides methods. I've seen a few different ways to do this on the internet and have read the words of jake here. But in my search ive found 3 different ways to do it. 2 of these ways include not using a companion object (as jake suggests) but I guess im a little lost on what the best practice is here. Help would be amazing.

  • 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.

    InfluxDB logo
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