Open WhosNickDoglio opened 1 year ago
Block Impl from being injected if it used @ContributesBinding
Logic might look like something like this:
This might have a large amount of false positives but we'll see 🤷
Maybe this is better as SPI check?
flag incorrect usage of @BindsInstance
Vanilla Dagger
@Binds
must be abstract@Provides
method should be static@Provides
or@Binds
methods make sure it's annotated with@Module
.@Binds
return type is super type of implAnvil
@MergeX
orContributesTo
annotations on Component and Subcomponents@ContributesTo
annotations on each Module@ContributesBinding
over@Binds
@ContributesBinding
has a super classHilt
@InstallIn
annotations on each Module@InstallBinding
over@Binds
(https://github.com/google/dagger/pull/3516)@HiltAndroidApp
,@AndroidEntryPoint
,@HiltViewModel
)by hiltViewModel()
for getting viewModels from DI Graph@EntryPoint
can only be applied to interfaces@InstallIn
Inspiration / Resources