I have some task:
task foo {
//Do something
}
foo.dependsOn(":bar:baz")
foo.dependsOn(":bar2:baz2")
This task should only run on windows. I know, I could do:
import org.apache.tools.ant.taskdefs.condition.Os
task foo {
if (!Os.isFamily(Os.FAMILY_WINDOWS)) {
return;
}
...
}
But this would still trigger the execution of the dependency tasks (:bar:baz and :bar2:baz2).
How can I avoid this?