I have simple multiproject build with one parent and one child (called subproject).
If I configure the child project in parent’s build.gradle:
dependsOnChildren()
apply plugin: 'java'
project(':subproject') {
apply plugin: 'java'
}
the tasks are exucuted in this order:
$ gradle classes
:sub:compileJava UP-TO-DATE
:compileJava UP-TO-DATE
:sub:processResources UP-TO-DATE
:processResources UP-TO-DATE
:sub:classes UP-TO-DATE
:classes UP-TO-DATE
BUILD SUCCESSFUL
But when I configure it in subproject/build.gradle
## build.gradle
dependsOnChildren()
apply plugin: 'java'
## subproject/build.gradle
apply plugin: 'java'
the tasks are executed in different order:
$ gradle classes
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:sub:compileJava UP-TO-DATE
:sub:processResources UP-TO-DATE
:sub:classes UP-TO-DATE
BUILD SUCCESSFUL
Why is the task exucution order different? I’ve read throught all the documentation, but haven’t found an answer for this behaviour. I checked it with gradle 1.0-milestone-3, 6 and 7
Thanks a lot, Pavel