August 2018
Beginner
178 pages
4h 56m
English
If Maven is your build tool of choice, then setting up Kotlin will be just as easy.
In the same way as with Gradle, we first need to add a Kotlin plugin to a pom.xml file. You can do this by adding these lines to the plugins section:
<plugin> <artifactId>kotlin-maven-plugin</artifactId> <groupId>org.jetbrains.kotlin</groupId> <version>${kotlin.version}</version> <executions> <execution> <id>compile</id> <goals><goal>compile</goal></goals> </execution> </executions></plugin>
We can define a Kotlin version at one place, inside the properties section:
<properties> <kotlin.version>1.2.40</kotlin.version></properties>
In the same way as with Gradle, the Kotlin standard library needs to be added to dependencies.
<dependencies> <dependency> ...Read now
Unlock full access