title: Android project with Java and Kotlin files, kapt or annotationProcessor?
body: <p>I would like to know if in an <strong>Android</strong> project mixing <strong>Java</strong> and <strong>Kotlin</strong> files we must use annotationProcessor or kapt, or both ? </p>
  
  <p>In my understanding <strong>annotationProcessor</strong> must be used for <strong>Java</strong> files using annotations for code generation, and <strong>kapt</strong> must be used for <strong>Kotlin</strong> files using annotations for code generation.</p>
  
  <p>I have a project mixing both languages, and I just have replaced all the annotationProcessor dependencies in the build.gradle by kapt.
  Surprisingly it builds and seems to run correctly but I do not understand why kapt works well even with Java files... </p>
  
  <p>Can someone explain to me ?</p>
  
  <p>Thank you</p>