gradle:调用另一个项目下的坡度文件

gradle:调用另一个项目下的坡度文件,gradle,Gradle,梯度5.4.1 /project-foo/build.gradle /project-bar/settings.gradle /project-bar/common-gradle/build-hello.gradle /project-bar/common-gradle/build-world.gradle project bar/common gradle不是项目目录,但仅包含常用的gradle文件 project foo/build.gradle调用项目栏下的build-hel

梯度5.4.1

/project-foo/build.gradle


/project-bar/settings.gradle   
/project-bar/common-gradle/build-hello.gradle
/project-bar/common-gradle/build-world.gradle 
project bar/common gradle不是项目目录,但仅包含常用的gradle文件

project foo/build.gradle调用项目栏下的build-hello.gradle,如下所示:

task build_hello(type: GradleBuild) {
    dir = "${rootProject.buildDir}/build-hello"
    buildFile = file("/project-bar/common-gradle/build-hello.gradle")
    ...
}  

assemble.dependsOn build_hello
生成项目foo时,出现错误:

Build file '/project-bar/common-gradle/hello.gradle' is not 
part of the build defined by settings file
'/project-bar/settings.gradle'. If this is an unrelated build, 
it must have its own settings file.
如果删除/project bar/settings.gradle,则构建项目foo将正常工作。错误消息是什么意思

是否应在不是项目目录的公共gradle目录下创建settings.gradle?它的内容是什么