Wednesday, 18 September 2013

dependsOn in configuration phase

dependsOn in configuration phase

Is it possible to use dependencies in configuration phase? Lets imagine
that we've got main project and 2 subprojects. What I want to achieve is
that configuration phases of subprojects should be started before main
project configuration phase:
:projectA
task init {
println 'init projectA'
}
:projectB
task init {
println 'init projectB'
}
:mainProject
:projectC(dependsOn: subprojects.finAll{ println it }) {
println 'init main project'
}
The output of gradle command looks like this:
init main project
init projectA
init projectB
but I want it to be
init projectA
init projectB
init main project

No comments:

Post a Comment