(Gradle 1.6) I have a multiproject which applies a plugin with one task. There is no dependencies between the projects. I’ve added a beforeTask and afterTask closure for the plugin task.
Lets call my subprojects sub1, sub2 and sub3 and the task in question myTask and that they have a println for the beforeTask config, beforeTask config and a println for the task action it self.
When I call the task from the root folder the output would typically be somthing like:
“sub1 beforeTask” “sub2 beforeTask” “sub3 beforeTask” “sub1 executing” “sub2 executing” “sub3 executing” “sub1 afterTask” “sub2 afterTask” “sub3 afterTask”
Is this to be expected ? In the dsl doc it says the before/after closures will be executed immediately before/after the task is executed. I guess thats not entirely true in a multi project setup ? If its intentional I would suggest modifying the doc