How to mix Java and kotlin when using ant?


#1

I'm aware of an example using maven, but how can achieve the same with ant ?

Thanks.

outersky


#2

First, you run the Kotlin compiler on the Kotlin sources you have, adding Java sources to the class path. It generates class files for the Kotlin code. Next, you run the Java compiler on the Java sources having the output of the Kotlin compiler on the class path: Java compiler sees the Kotlin classes and works fine.


#3

It works.

But I found out that , if I compiled twice,  it recompiled all kotlin source files even though nothing is changed.


#4

Yes, incremental compilation is not supported yet


#5

see