Multiple Java src dirs

Is there a problem with the Kotlin compiler when trying to compile against multiple Java source directories? I have a process that generates some code into a generated sources dir. Then, the Kotlin compiler runs, depending on some of this Java source code. In my Gradle project, I have the following:

sourceSets {
  main {
  java {
           srcDir ‘src/main/java’
           srcDir ‘generated/’
           srcDir ‘src/main/kotlin’
  }
  }
}


But the generated directory doesn’t seem to be getting picked up by the kotlin compiler, though it is picked up by the Java compiler.

Jon,

Thank you for the report. I have opened an issue: http://youtrack.jetbrains.com/issue/KT-4393

As a workaround, please add following section to your build:

compileKotlin {
  setClasspath(getClasspath() + files(‘generated’))
}

Fixed in #0.9.164