ForgeGradle
ForgeGradle copied to clipboard
Gradle does not pass console commands to server
When I start a server using ./gradlew runServer the server starts but writing stop into the console does not work and is not passed to the server. Using --no-daemon does not help. If the server is started from IntelliJ or eclipse it does work and the commands are passed to the server.
gigaherz found this:

Unfortunetly the runServer task is ~~not a normal task~~ generated to late, so even using
project.afterEvaluate {
tasks.runServer.standardInput = System.in
}
doesnt work.
No idea if this is still relevant for you after 2 years, but I've found a working alternative to the afterEvaluate snippet you posted:
tasks.withType(Task) {
if (it.name == "runServer") {
it.standardInput = System.in
}
}