I am facing a problem with using Kotlin alongside with Java in a TestNG + Maven project. My Kotlin file needs some dependencies which will be auto generated during compile time, but for some stupid reasons, it seems that Kotlin compiles first and at that time, the supposed-to-be generated dependencies, which are in Java, have not been generated yet and it leads to the error of not being able to access the classes and asked me to check if it is missing or conflicting. When I used Java, everything works perfectly fine.
During my development, I also find it really annoying to deal with the problem of configuring Java and Kotlin in Maven. Will Kotlinc be able to compile Java as well?
One more problem, why can’t there be like a static annotation for java function without using the companion object?
Thank you for your time and consideration. I am looking forward to seeing Kotlin better.