When I’m using `gradle run`, `readlnOrNull` immedi...
# getting-started
j
When I’m using
gradle run
,
readlnOrNull
immediately returns null without reading any input. How to fix it?
s
Does running with
--no-daemon
fix the problem?
Actually I doubt that it will, since
--no-daemon
actually still uses a daemon (just a single-use one) these days
e
that, or just don't use console from gradle tasks at all. https://github.com/gradle/gradle/issues/1251
k
Add this to your build.gradle.kts:
Copy code
tasks.run.configure {
    standardInput = System.`in`
}
👍 2