Hello people, in hilt is there a way to differenti...
# dagger
g
Hello people, in hilt is there a way to differentiate modules to be installed in specific entrypoints only?
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
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
the other way to scope it to specific fragment is to use
@Qualifiers
g
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.
r
https://dagger.dev/hilt/monolithic There is an explanation why hilt choosed a monolithic approach