proper way to run kotlin application from gradle task

Thanks to the link how to run compiled class file in Kotlin? provided by @JaysonMinard
that main

@file:JvmName("Example")

package com.lapots.game.journey.ims.example


fun main(args: Array<String>) {
    print("executable!")
}

and that task

task runExample(type: JavaExec) {
    main = 'com.lapots.game.journey.ims.example.Example'
    classpath = sourceSets.main.runtimeClasspath
}

did the trick

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)