I'm getting this note in the build whenever I do an inject into a kotlin class (btw, I have a mixed android project with both kotlin and java).
For example, after this gradle task: compileStagingDebugJavaWithJavac
(StagingDebug is my build variant), I get this message:
"Note: Generating a MembersInjector or Factory for com.packageNameXXX.CourseDiscoveryMapFragment. Prefer to run the dagger processor over that class instead."
My CourseDiscoveryMapFragment code can be seen here:
class CourseDiscoveryMapFragment : Fragment(){
@Inject
lateinit var presenter: CourseDiscoveryMapPresenter
lateinit var mapView: MapView
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
val view = inflater.inflate(R.layout.fragment_discovery_map, container, false)
MapsInitializer.initialize(activity)
mapView = view.mapView
mapView.onCreate(savedInstanceState?.getBundle(BUNDLE_KEY_MAP_STATE))
(activity as BaseActivity)
.activityComponent.inject(this)
}
And my ActivityComponent is :
@ActivityScope
@Subcomponent(modules = ActivityModule.class)
public interface ActivityComponent {
void inject(BaseActivity baseActivity);
void inject(CourseDiscoveryMapFragment fragment);
//Exposed to sub-graphs.
Activity activity();
}
So, I'm having dagger component and modules written in Java, while having dagger injections in Kotlin.
Is this anything that I should be worried about?
Thank you.