We have been using gradle for about a year and have been somewhat successful with it. A number of features are still a little opaque, but we are getting there. I am not sure
This is working quite well:
ext{
buildPrefix = "build"
allProjects = ["P1", "P2"]
}
def createTasks(String prefix) {
def newTasks = allProjects.each {
def pName ->
def tName = "$prefix$pName"
tasks.add(name: tName, type: GradleBuild) {
dir = pName
tasks = [ prefix ]
}
}
}
createTasks(buildPrefix)
ext {
buildTasks = tasks.findAll{ t -> t.name.startsWith(buildPrefix) }
}
task build(dependsOn: buildTasks) {}
I can just add the other tasks that I want to expose at the top level.
Thanks for the pointers.