build.gradle
plugins {
id 'eclipse'
}
allprojects {
task publishAll() {
println "publishAll ..........."
}
}
subprojects {
task publishSub() {
println "publishSub ..........."
}
}
output:
$ gradle eclipse
publishAll ...........
publishAll ...........
publishAll ...........
publishSub ...........
publishSub ...........
:eclipseProject
:eclipse
Although I get this fixed by adding doFirst block to the task ( http://forums.gradle.org/gradle/topics/why_is_my_task_being_executed). But I think this still a issue. These tasks should not run without invokel/dependsOn.