Hello everyone, can anyone help me with an issue w...
# android
l
Hello everyone, can anyone help me with an issue with hilt and modularised apps? So far my app has 3 modules: app (the default one), di and network. The idea here is putting hilt related dependencies in the DI module, so consumer modules can use this DI library without explicitly declaring the dependencies in the module's gradle file.
😶 2
Currently this is my structure: Network consumes DI module App consumes both Network and DI But for some reason the hilt module declared in the Network module throws an error saying that the dependencies needed to create the objects aren't defined
In this image you can clearly see that SharedPreferences and NetworkClientRepository are declared in my module file
But i keep receiving these two errors saying that those types aren't defined in a module with @Provides annotated method
I found a solution, i forgot to add the hilt/kapt dependencies in the Network module
But i'm still wondering why i have to declare the hilt dependencies in every module instead of declaring only in the DI module