I am afraid you can't. Why not write dependency modules in Kotlin?
To write dependency modules in java, you need to configure your Gradle script in this way:
compile 'com.google.dagger:dagger:2.8' apt 'com.google.dagger:dagger-compiler:2.8'
But, to write dependency modules in Kotlin, you should configure your Gradle script in this way:
compile 'com.google.dagger:dagger:2.8' kapt 'com.google.dagger:dagger-compiler:2.8'
dagger need the annotation processing tool to generate the dependency code during the compiling process. So I guess you just need to use the right APT(annotation processing tool) according to right language.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With