Thanks for the reply. Is there an official documentation about them? - if not I would create an issue in Github.
For “One” how you did you know that the latter does not work? Just testing or some error was thrown?
For “Two” based on the command’s output, Did you get that conclusion?
You can exclude a task from being executed using the -x or --exclude-task command-line option and providing the name of the task to exclude.
The commandline --help says
Specify a task to be excluded from execution.
So I’d say it pretty clearly mentions that you can exclude one task with one -x argument.
It does not mention though, that you can have multiple -x arguments, but that is the same as with other parameters like -I, -D, or -P.
If you think more clarification is necessary I also suggest you open a feature request issue for that.
For “One” how you did you know that the latter does not work? Just testing or some error was thrown?
Well, I use Gradle since its pre-1.0 phase and just know it pretty well.
Besides that, there will not be an error as gradle build -x javadoc test is a valid command.
It says “execute build and test, but exclude javadoc” :-).
For “Two” based on the command’s output, Did you get that conclusion?
I’m not sure what you mean.
You asked whether it makes a difference in which order you exclude tasks.
And I said no, it does not matter in which order you don’t do tasks because you don’t do them.
The order in which you specify tasks that should be executed would be a different topic.
Because if the tasks do not appear in the others’ dependency tasks, then they are executed in the order you specify them.
But actually this should usually not really have a significance, because if the build works with one order but does not work with another order, then the build has a bug where some dependency declaration is missing.