Open GoetzConsulting opened 2 years ago
We'll need to implement something similar to what has been done in CUBA Gradle plugin (the issue). Kotlin and java entities must be enhanced only after both of them are compiled.
It seems that the reason of the exception described in the issue is that main application class is written in Java. If it was in Kotlin the error would not appear. As a workaround the main class can be converted to Kotlin. The forum discussion: https://forum.jmix.io/t/unable-to-compile-run-when-mix-a-jmix-java-application-with-kotlin-classes/2412/5
Jmix version: 1.2.3
We started very early with the JMIX framework and wrote our application with Java.
Now we want to migrate our project step by step to Kotlin. In doing so, we encounter an error when we use mixed Java and Kotlin code.
The EclipseLink enhancer runs before the Java files have been compiled and are in the build directory.
We think we have found the responsible place: https://github.com/jmix-framework/jmix/blob/master/jmix-gradle-plugin/src/main/groovy/io/jmix/gradle/JmixPlugin.groovy#L93