Reputation: 490
I have a Gradle project with the next structure:
prj
+---subprj1
| \---build.gradle
+---subprj2
| \---build.gradle
\---build.gradle
subprj1/build.gradle contents are:
task caller (type: GradleBuild) {
setTasks(["subprj2:callee"])
}
and subprj2/build.gradle contents are:
task callee {
println "Has been called."
}
This way it doesn't work.
Is it possible to use setTasks
& GradleBuild
task type at this case?
How to do that?
Upvotes: 0
Views: 55
Reputation: 7211
This should call callee
just before caller
task caller (dependsOn: [':subprj2:callee']) {
}
or:
task caller {
dependsOn ':subprj2:callee'
}
or:
caller.dependsOn ':subprj2:callee'
Upvotes: 1