Fragments, Activities, etc should use @AndroidEntryPoint to perform member injection. @Inject constructs won't work here since the framework instantiates the components and dagger has no opportunity to provide constructor parameters.
The main value of this check is an explanation to engineers new to dagger why this is wrong. A quick fix should be doable for this. The detector and fix should work for both Java and Kotlin source.
Ideally, this would be in the hilt library jar, because this rule (specifically the error description and quick fix) are only applicable if hilt is on the classpath.
Fragments, Activities, etc should use
@AndroidEntryPoint
to perform member injection.@Inject
constructs won't work here since the framework instantiates the components and dagger has no opportunity to provide constructor parameters.The main value of this check is an explanation to engineers new to dagger why this is wrong. A quick fix should be doable for this. The detector and fix should work for both Java and Kotlin source.