pluginManagement {
    repositories {
        // 优先国内镜像，顺序固定，不冗余
        maven { url = uri("https://maven.aliyun.com/repository/gradle-plugin") }
        maven { url = uri("https://maven.aliyun.com/repository/google") }
        maven { url = uri("https://maven.aliyun.com/repository/public") }
        // 精准拦截安卓/Google依赖，不走外网
        google {
            content {
                includeGroupByRegex("com\\.android.*")
                includeGroupByRegex("com\\.google.*")
                includeGroupByRegex("androidx.*")
            }
        }
        // 仅兜底，不主动访问外网
        mavenCentral()
    }
}

// 注释/删除 foojay 国外下载插件（根治JDK下载慢）
// plugins {
//     id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
// }

dependencyResolutionManagement {
    // 关闭严格模式，避免校验超时
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        // 核心国内镜像，无重复冗余
        maven { url = uri("https://maven.aliyun.com/repository/google") }
        maven { url = uri("https://maven.aliyun.com/repository/central") }
        maven { url = uri("https://maven.aliyun.com/repository/public") }
        // 第三方开源库必备源
        maven { url = uri("https://jitpack.io") }
        // GeckoView (Mozilla)
        maven { url = uri("https://maven.mozilla.org/maven2/") }
        // 兜底源
        google()
        mavenCentral()
    }
}

rootProject.name = "StandAPP"
include(":app")