build.gradle
task build(type: GradleBuild) {
buildFile = 'other.gradle'
tasks = [ 'hello']
}
other.gradle
task hello << {
println "hello from the other build."
}
Output of gradle -q build
gradle -q build hello from the other build.