On 18/11/2011, at 1:52 AM, ecrane wrote:
> Ah, thanks for the tip. However, that will disable ALL tasks with that name,
> correct? Not just one in a particular subproject? I realize I didn't mention
> this in my first message (my apologies), but I'm specifically trying to
> disable the 'test' task and its dependsOn tasks for one subproject in a
> multi-project build. Specifically, I have a functional testing subproject
> whose 'test' task I want to skip unless I specifically run it, so that it
> won't be run with other 'test' tasks when I do 'gradle test'. For the
> moment, I've simply disabled the test task on the functional test project
> and created a separate 'functionalTest' task that only it has.
A simple solution would be to use a different name for the task that runs the
functional tests:
apply plugin: 'java'
task functionalTest(type: Test) {
// The defaults should just work
}
test {
// disable the test task and clear out its dependencies, so it does nothing
enabled = false
dependsOn = []
}
To me, a better solution would be to use a 'functionalTest' source set, instead
of overloading the 'test' source set. Have a look at
$gradleHome/samples/java/withIntegrationTests for how this can be done.
>
> --
> View this message in context:
> http://gradle.1045684.n5.nabble.com/Any-way-skip-a-task-AND-all-tasks-it-depends-on-tp4992043p5001364.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com