Hello people, in hilt is there a way to differentiate modules to be installed in specific entrypoints only?
gumil
06/20/2020, 5:00 PM
I would like to avoid
Copy code
@InstallIn(FragmentComponent::class)
in a module and it gets installed on every fragment i have in the app
a
Arun
06/20/2020, 6:39 PM
Currently this is possible only via a custom component defined with
@DefineComponent
.
installed on every fragment
this is an intentional design of hilt to have global binding space
Arun
06/20/2020, 6:41 PM
the other way to scope it to specific fragment is to use
@Qualifiers
g
gumil
06/20/2020, 6:44 PM
hmm, then it would be easier not to use hilt then. Do you know the reason why hilt did it this way? I like the separation of modules between fragments.