Simplest possible Kotlin hello world for gradle script Kotlin:
thufir@dur:~/github/gradleScriptKotlin$
thufir@dur:~/github/gradleScriptKotlin$ gradle clean shadowJar;java -jar build/libs/gradleScriptKotlin.jar
> Task :compileKotlin
Using Kotlin incremental compilation
> Task :shadowJar
A problem was found with the configuration of task ':shadowJar'. Registering invalid inputs and outputs via TaskInputs and TaskOutputs methods has been deprecated and is scheduled to be removed in Gradle 5.0.
- No value has been specified for property 'mainClassName'.
The SimpleWorkResult type has been deprecated and is scheduled to be removed in Gradle 5.0. Please use WorkResults.didWork() instead.
BUILD SUCCESSFUL in 1s
4 actionable tasks: 4 executed
Hello gradle script Kotlin world!
thufir@dur:~/github/gradleScriptKotlin$
For the sake of brevity please refer to the project itself which only really consists of the build file and a kotlin script.
How to build a runnable ShadowJar with a gradle script Kotlin build file?