You can use either Gradle or Maven to build your Kotlin project. You can create a new Kotlin project in Intellij IDEA without any build automation, but here is how to set up a Kotlin project for Gradle and Maven.
Configuring Kotlin
Configuring Kotlin for Gradle
To use the Kotlin language with Gradle, first add the following buildscript { } block to your build.gradle file:
buildscript {
ext.kotlin_version = '<version to use>'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-
plugin:$kotlin_version"
}
}
Then, you will need to apply the plugin, as shown in the following code, as well as the directories that will...