https://kotlinlang.org logo
#dagger
Title
# dagger
k

KoskiA

04/26/2021, 1:59 PM
Is there a way to ensure that a multibound type uses a specific scope and qualifier? That is, if I have
@Multibinds @Singleton @MyQualifier Set<Foo>
, how could I make sure there isn't a binding that's accidentally unqualified or
@ActivityScoped
, and thus be missing from the
@Singleton @MyQualifier
Set I'd be injecting?
a

Arun

04/26/2021, 2:07 PM
You could use Dagger SPI to build validations for this. I wrote about this here. https://arunkumar.dev/dagger-spi-building-custom-validations-for-dependency-graphs/
4 Views