You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use Kotlin's documented Maven setup to compile Kotlin before Java #881
We get Kotlin compiled before javac by binding the Kotlin executions to earlier phases: compile runs at process-sources, and since #879test-compile runs at process-test-sources. #879 needed that so ResolverMethodsTest.java could call the Kotlin assertEveryFieldResolves helper. Without it, javac compiled the Java tests before any Kotlin test class existed.
It works, but it isn't how Kotlin's docs say to do it. The Maven guide has two options:
<extensions>true</extensions> on kotlin-maven-plugin, declared before maven-compiler-plugin. It adds the Kotlin executions itself, and the docs say not to configure the compiler plugin's executions with it.
Keep the Kotlin executions at compile / test-compile, set default-compile and default-testCompile to <phase>none</phase>, and add java-compile / java-test-compile executions after Kotlin.
The second one probably fits better, since we already configure default-testCompile (useModulePath=false, with a TODO for 15.0.0) and the java17-tests profile adds its own java17-test-compile execution. Both have to keep working, along with module-info.java and the release profile's source and javadoc jars.
Activity