Friday, December 13, 2019

using Java, Kotlin and dagger together in project

If we are using java, kotlin and dagger together in project.

Follow this steps

kapt
Kapt is the Kotlin Annotation Processing Tool, and it’s in pretty good shape these days. If you want to be able to reference generated code from Kotlin, you need to use kapt. To do that, simply include the plugin in your build.gradle file with the line:


apply plugin: 'kotlin-kapt'







And in dependencies

kapt 'com.google.dagger:dagger-compiler:2.13'