Hey folks! Just a general question on DI best pra...
# android
a
Hey folks! Just a general question on DI best practice. If you have multiple modules and best practice is to prefer pure kotlin modules where possible, so you people generally use hand rolled di there and Hilt in Android modules? Or is a Koin/hilt mix common?
s
All my code apart from pure UI at this point is in common code, so hilt at the android level would be useless for me, there's just no need, so I just use koin everywhere
c
Might get more comments in #dagger?
a
Thanks. Started to feel like Hilt is just the training wheels android DI that is meant to be discarded after your project grows 😛
👍 2
c
I think my last 10 projects have all used hilt so we haven't really moved away from it, but id be interested to see if we ever do move away from it
a
Do you just use dagger in pure kotlin modules? Or are these projects not large enough to merit modularization?
c
i typically just use it in the app module unfortunately because theres always issues when it comes to multi module and DI. 🙃
r
Koin and Hilt/Dagger are different. If you’re having multi-module DI issues with Dagger, it’s usually a config issue. Anvil could be of use to you in that regard.
t
I use Koin for the KMP project because it is easy to set up and use. I think we shouldn’t mix two DI libraries for consistency.
👍 1