Trying to follow official gradle 6.3 user manual I faced example that doesn't work. build.gradle:
project('projectA') {
task taskX {
dependsOn ':projectB:taskY'
doLast {
println 'taskX'
}
}
}
project('projectB') {
task taskY {
doLast {
println 'taskY'
}
}
}
But if I run gradle -q taskX
I get:
FAILURE: Build failed with an exception.
* Where:
Build file '[path_to_gradle_file]/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating root project 'dependency'.
> Project with path 'projectA' could not be found in root project 'dependency'.