allprojects { repositories { // 使用阿里云镜像 maven("https://maven.aliyun.com/repository/public") maven("https://maven.aliyun.com/repository/google") maven( "https://maven.aliyun.com/nexus/content/repositories/releases/" ) // 集成华为通道需要配置 HMS Core SDK 的 Maven地址 maven( "https://developer.huawei.com/repo/" ) maven( "https://developer.hihonor.com/repo" ) google() mavenCentral() } } val newBuildDir: Directory = rootProject.layout.buildDirectory .dir("../../build") .get() rootProject.layout.buildDirectory.value(newBuildDir) subprojects { val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) project.layout.buildDirectory.value(newSubprojectBuildDir) } subprojects { project.evaluationDependsOn(":app") } tasks.register("clean") { delete(rootProject.layout.buildDirectory) }