Jvmargs in gradle.properties disables inputstream [Duplicate]

Hi, this is a bit unusual, and hurts my gradle plugin which creates a shell prompt.
When I put any “org.gradle.jvmargs=” property in my gradle project, then my shell prompt stops working.

To reproduce:

mkdir propbug
cd propbug/
gradle init --type java-library
echo 'plugins {
  id "java"
   id "com.github.tkruse.groovysh" version "1.0.6"
repositories {
}' > build.gradle
gradle -q shell
# typing works, Ctrl-c to exit
echo "org.gradle.jvmargs=-XX:MaxPermSize=512m" > gradle.properties
gradle -q shell
# now typing does not work anymore.

I have no idea what could be the problem. I believe this is the case since gradle 1.12 at least.

EDIT: I notice giving an invalid jvmarg value gives an error saying: “Unable to start the daemon process.” So if using jvmargs implies using the gradle daemon, that explains the problem (somewhat), as using the daemon causes the same symptom.

Your suspicions are correct, Gradle has to fork a new process to honor the jvmargs settings:


GRADLE-2310 is the underlying issue with System.in/System.console and the daemon.