From what I can see you are not requesting the task to be executed on the command line. Or did you declare it as task dependency for one of the tasks listed above?
If you just want to execute the single task, you can do so by running “gradle genOCFWUploadFiles”. If you want the task to be executed as a task dependency, it’s a matter of when you want this to happen. For example if you want the task to be executed before the task “build”, you can declare a dependency as such:
build.dependsOn genOCFWUploadFiles
I don’t understand your last question. Please give us more information on it.
<< means the same as doLast. In your case you do not need this operator as you are configuring a custom task. Please refer to the Gradle documentation for more information.
You can provide any desired value for your project property from the command line e.g. -PyourProp=yes or -PyourProp=no. Then within your task you use the value of this property to configure the task.
I am not looking to pass this to gradle. Like where I get Stdout like standardOutput = new ByteArrayOutputStream() I want to get the Stdin and perhaps write a string like “YN Y”. I know what I want to pass to the stdin of the process before hand.
What are you planning to do with this input? Pass it on to the external cmd file? The Exec task is configured before any task action is executed. So any input you get from a user would (which is done during the execution phase) to be used to configure the Exec task.
Did you notice that you switched the direction of the dependency? ‘build.dependsOn genOCFWUploadFiles’ isn’t the same as ‘genOCFWUploadFiles.dependsOn build’.