what’s the recommend way to prompt a user for inpu...
# gradle
b
what’s the recommend way to prompt a user for input?
3
r
How is that related to Kotlin
b
I can’t use System.console() and I’m unsure if there is anything similar because readLine() and gradle output are kinda weird
g
Are you talking about prompt user for Gradle task or for your application which you run with Gradle?
b
@gildor I want to create an initProject task which generates a dev profile spring boot
prompts a few values like: where are uploaded files stored
Ideally I could just get gradle to interactively prompt the console paramters annotated via @Input
via flag
t
console is available if you will run gradle without daemon mode enabled. Other workaround would be trigger some UI (search in internet - stumbled around this solution some time ago) And last possible way is to use kotlin script (not gradle one), see https://github.com/Tapchicoma/ktsexec-gradle. Note that this
ktsexec
task is experimental as kotlin script is currently actively developed and in next release it would changed quite a lot.
for this type of questions - better to ask in Gradle slack workspace, see channel topic