Building a self-executable JAR with Gradle and Kotlin
Add the plugin application, then set the mainClassName as mainClassName=”[your_namespace].[your_arctifact]Kt” For instance, suppose you have placed the following code in a file named main.kt: package net.mydomain.kotlinlearn import kotlin import java.util.ArrayList fun main(args: Array<String>) { println(“Hello!”) } your build.gradle should be: apply plugin: ‘kotlin’ apply plugin: ‘application’ mainClassName = “net.mydomain.kotlinlearn.MainKt” In fact Kotlin is building a … Read more