The ‘run’ task is of type JavaExec, which means that it can easily be configured with command line parameters. If you want to set those from the command line, you have to pass system or project properties and configure the ‘run’ task accordingly.
Yes, I checked the JavaExec documentation out already. It would be necessary to set the args list.
I just hoped that there would be some easier, less manual, more “standard” way to pass arguments to the executing java application.
‘gradle run -Parg1=foo -Parg2=bar’ and then manually parsing argx properties into a List feels not very gradle-like, especially if something like this is required in several unrelated projects.
I was aiming to remove the need for a real application distribution by means of zip, using just Gradle instead.
You might want to make it a single ‘-Pargs=…’ property. Our longer term goal is to have a generic way for setting task properties from the command line.
Anyway, I think an example in the documentation of the application plugin concerning command line arguments (and also io redirect as described in Gradle Forums… ) would be helpful.