我的构建文件很大,很难维护,如何将构建文件拆分为单独的文件,并将较小的任务导入主渐变文件
build.gradle
apply from: 'other.gradle'
其他等级
println "configuring $project"
task hello << {
println 'hello from other script'
}
gradle-q hello的输出
> gradle -q hello
configuring root project 'configureProjectUsingScript'
hello from other script
来源:使用外部构建脚本配置项目