Of course, !nnn has special meaning for bash, so using this format is
not a good idea.
I guess this means we use the - character instead:
gradle build -test
Or put the exclude character at the end:
gradle build test!
gradle build test-
Or have a separator between the included and excluded task names,
something like:
gradle [task-name]* ( - [task-name]+ )
gradle clean build - checkstyle test
Thoughts? I prefer the - at the end of the task name: gradle build test-
Adam Murdoch wrote:
Hi,
I've just checked in a change which (I think) improves the
command-line interface for skipping tasks.
Basically, now you can exclude a task from being added to the DAG by
using a !nnn syntax on the command-line. For example:
gradle build !checkstyle
This basically means run the build task, but do not add checkstyle to
the DAG. The dependencies of checkstyle are not added to the DAG
either, unless they are dependencies of some other task which does get
added to the DAG. For example:
task a
task b(dependsOn: a)
task c(dependsOn: b)
task d(dependsOn: [a, c])
Then,
gradle d !c executes [a, d]
gradle c !b executes [c]
And, some more interesting cases:
gradle c !c executes []
gradle b !d executes [a,b]
The !nnn expression uses the same matching algorithm as an nnn
expression:
gradle !nnn excludes all tasks with name 'nnn' in the current project
and all its subprojects
gradle !sub:nnn excludes task 'nnn' in subproject 'sub' of the current
project
gradle !:proj:nnn execludes task 'nnn' is project ':proj'
Finally, ordering is not significant for the !nnn expressions. They
can be anywhere on the command-line and they take precedence over the
nnn expressions. I did think about using -nnn syntax instead, but then
we lose the ability to have command-line options anywhere on the
command-line, which I really like.
I plan on removing support for skip properties, as they are no longer
required (and are very easy for someone to code up in their build
script if they care).
Adam
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email