February 2018
Intermediate to advanced
350 pages
7h 35m
English
The default position where Gradle searches for Kotlin files is in the src/main/kotlin directory. We'll place our hello.kt file in the src/main/kotlin/com/packtpub/appendix directory:
package com.packtpub.appendixfun main(args: Array<String>) { println("Hello, World!")}
And now we can compile and run in one go with the following command:
$ ./gradlew
As we defined that our default task is run and our main class is com.packtpub.appendix.HelloKt, just by running ./gradlew we can build and run our peogram.
Read now
Unlock full access