in src/main/kotlin/io/bazel/kotlin/builder/tasks/jvm/JavaCompiler.kt [39:63]
fun compile(context: CompilationTaskContext, command: JvmCompilationTask): List<String> {
val i = command.inputs
val d = command.directories
if (i.javaSourcesList.isNotEmpty()) {
val args = mutableListOf(
"-cp", "${d.classes}$DIR_SEP${d.temp}$DIR_SEP${i.joinedClasspath}",
"-d", d.javaClasses
).also {
it.addAll(
// Kotlin takes care of annotation processing.
"-proc:none",
// Disable option linting, it will complain about the source.
"-Xlint:-options",
"-source", command.info.toolchainInfo.jvm.jvmTarget,
"-target", command.info.toolchainInfo.jvm.jvmTarget
)
it.addAll(command.inputs.javacFlagsList)
it.addAll(i.javaSourcesList)
}
context.executeCompilerTask(args, { a, pw ->
javacInvoker.compile(a, PrintWriter(pw))
})
}
return emptyList()
}