savvypana.blogg.se

Kotlin with java
Kotlin with java










kotlin with java

To do that, let’s create an Application class with a main() method. We can see that the default executions are disabled using phase none, and Java-specific executions are bound to compile and test-compile phases. We need to disable them and enable java-compile and java-test-compile instead to ensure that kotlin-maven-plugin execution will happen before maven-compiler-plugin: But the former has two specific executions that are executed before everything else during the phases: default-compile and default-testCompile. So we should place maven-compiler-plugin after kotlin-maven-plugin. While Kotlin libraries are growing in number.

kotlin with java

We need to adapt maven-compiler-plugin configuration as we need Kotlin sources to be compiled before Java sources.įrequently, Maven plugins executions happen according to the declaration order. Particularly for new projects, most likely you will be focused on Kotlin code calling into Java code. This is nearly the end of the configuration.












Kotlin with java