Rohan Maity
05/26/2019, 10:19 AMfun main() {
val numbers = readLine()?.split(',')?.map {
it.toInt()
}
println(numbers?.sum()?:"No Numbers")
}
I have written this code that takes input. When I run from terminal ./file.kexe
it works fine. But I want to create run configuration for running generated kexe file which would take input also
like it does with ./file.kexe
Arkadii Ivanov
05/26/2019, 10:24 AMRohan Maity
05/26/2019, 10:24 AMgildor
05/26/2019, 10:25 AMRohan Maity
05/26/2019, 10:26 AMilya.matveev
05/27/2019, 8:33 AMExec
task so you can override the input stream as described at https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Exec.html
The configuration will be the following (Kotlin DSL):
kotlin {
macosX64("macos") {
binaries {
executable {
runTask?.standardInput = System.`in`
}
}
}
}
ilya.matveev
05/27/2019, 9:14 AM./gradlew :runDebugExecutableMacos --console=plain -q