On 19/03/2011, at 12:35 PM, ewhauser wrote:
> Is there any way to pass command line arguments when using the application
> plugin?
>
> gradle :myapp:run -argsToHere
You can't do this yet, though this is something we want to allow in the future.
In the meantime, you could use a project property:
gradle :myapp:run -Pargs="a b c"
and in your build script, you could do something like:
run {
if ( project.hasProperty('args') ) {
args project.args.split('\\s+')
}
}
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
Co-Founder and VP of Engineering, Gradleware Inc. - Gradle Training, Support,
Consulting
http://www.gradleware.com