I work with the following project structure Project
--- Subproject1
--- Subproject2
--- Subproject3
| build.gradle
| settings.gradle
Subproject 2 depends on subproject 1
Subproject3 depends on subproject 2
For all subprojects, I need a "build" task that will be configured for each project. But before the “build” some initialization task (the same for all subprojects) must be completed. The fact is that this initialization task should be performed once and only once during assembly, without the obscene project that I am building - the root project or any of the subprojects. For example, if I create Subproejct3, the sequence should be as follows: in this build subproject1 build subproject2 build Subproject3
"doFirst" "build" build.gradle "init". "init" "".
root "", , .