Is it possible for a custom plugin to create new command line arguments? Something similar to --all on 'tasks'.
I'd like those arguments to be either specific to custom tasks or project wide.
|
On 9 Jan 2014, at 6:13 pm, Xavier Ducrohet <[hidden email]> wrote: > Is it possible for a custom plugin to create new command line arguments? Something similar to --all on 'tasks'. > > I'd like those arguments to be either specific to custom tasks or project wide. There's an internal mechanism for task level that we could look at promoting: https://github.com/gradle/gradle/blob/master/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/options/Option.java https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/Test.java#L684 I'm not sure of anything for global switches or anything in the works. What's your use case here? -- Luke Daley Principal Engineer, Gradleware http://gradleware.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
For the project wide thing, we have a case where we enable a certain build mechanism to speed up further incremental build but this makes the first build quite a bit slower, so we want to easily disable it for CI builds that will always be clean build anyway.
There's a DSL element to enable/disable this mechanism, but injecting a value to set this from the command line is just awkward, so I wanted to see if I could just have my plugin create a --disable-foo option to the command line which would be nicer.
On Thu, Jan 9, 2014 at 12:20 PM, Luke Daley <[hidden email]> wrote:
|
oh and for the task based one, I think it would be good to have this as public API (in some form). We use a custom test runner to run Android tests on device and we'd like to provide options there too.
On Thu, Jan 9, 2014 at 12:26 PM, Xavier Ducrohet <[hidden email]> wrote:
|
Is there something preventing you from using a project property?
Then you would set '-PbuildIncremental=true' on the command line.
-- John Engelman On Thursday, January 9, 2014 at 12:31 PM, Xavier Ducrohet [via Gradle] wrote:
|
It's possible but it seems less elegant than a custom command line arg. Also discoverability is an issue. On Thu, Jan 9, 2014 at 12:43 PM, johnrengelman <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |