Not able to read from stdin using gradle api

(kunal.dabir) #1

I am using gradle api 1.7 to connect to a gradle Project that needs user input (interactive). I have tried several ways but nothing worked for me so far. What should I be setting in ‘setStandardInput’ so that gradle api makes the build wait for user input





When using ‘’ I get the following error

Exception in thread “DisconnectableInputStream source reader” org.gradle.internal.UncheckedException: No input provided for project

at org.gradle.internal.UncheckedException.throwAsUncheckedException(

at org.gradle.util.DisconnectableInputStream$


Caused by: No input provided for project




at org.gradle.util.DisconnectableInputStream$

… 1 more

(Attila Kelemen) #2

As far as I know forwarding stdin does not work properly. I have opened an issue here: GRADLE-2462. Your most sensible option is to use arguments like ‘withArguments("-PmyArgument=myValue")’ and request “myValue” yourself.

However, I haven’t checked this issue recently.