I have a Java application that runs with a custom gradle task and the application requires some arguments upon being invoked. These are:
programName ( string
You need to pass them as args to the task using project properties, something like:
args
args = [project.property('h')]
added to your task definition (see the dsl docs)
Then you can run it as:
gradle -Ph run