allprojects {
    repositories {
        maven { url 'https://maven.aliyun.com/repository/central' }
        google()
        mavenCentral()
    }
}

rootProject.buildDir = "../build"

subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}

subprojects {
    project.evaluationDependsOn(":app")
}

subprojects {
    if (project.name != "app") {
        project.afterEvaluate {
            if (project.hasProperty("android")) {
                project.android {
                    compileSdk 36
                }
            }
        }
    }
}

tasks.register("clean", Delete) {
    delete rootProject.buildDir
}