This project is the result of wanting to create a Kotlin application and using the Gradle build system, built from the ground up i.e not using an IDE's Gradle plugin.
This is a list of references used in compiling this recipe:
I was working on macOS 10.13 (High Sierra) at the time, so details may vary on the platform you're working on or version of software currently available.
- Java JDK8
- VS Code ++ Gradle Language Support plugin ++ Kotlin plugin ++ Kotlin Language plugin
- Gradle
- Work through the Creating New Gradle Builds guide using the Kotlin examples.
- Create the Kotlin source folder
src/main/kotlinto your project and create theHelloWorld.ktKotlin file in it. - Edit the
build.gradle.ktbuild file used in the Gradle guide to this one to include the Kotlin andapplicationplugins and dependencies. - (Optional) Create a
local.propertiesfile to include the configurationkotlin.incremental=true.
To build and run the simple application, run the following for the CLI (root of the project):
$ ./gradlew clean build run