ted
09/16/2023, 1:21 PMclass Hello : CliktCommand() {
val count: Int by option().int().default(1).help("Number of greetings")
val name: String by option().prompt("Your name").help("The person to greet")
override fun run() {
repeat(count) {
echo("Hello $name!")
}
}
}
fun main(args: Array<String>) = Hello().main(args)
source
I can run it from intellij but how do I create the executable ./hello
?ted
09/16/2023, 1:59 PM./gradlew installDist
which created
./build/install/app/bin/app