buildscript { repositories { google() mavenCentral() // Huawei AppGallery Maven maven { url = uri("https://developer.huawei.com/repo/") } } dependencies { classpath("com.android.tools.build:gradle:8.11.1") classpath("com.google.gms:google-services:4.4.2") classpath("com.huawei.agconnect:agcp:1.9.1.303") } } allprojects { repositories { google() mavenCentral() maven { url = uri("https://developer.huawei.com/repo/") } } } 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) }