fix: CI跳过国内Maven镜像,修复GitHub Actions构建失败

This commit is contained in:
WaterRain 2026-07-07 02:10:21 +00:00
parent 814ae61f01
commit 5e630c8895
No known key found for this signature in database

View File

@ -1,4 +1,5 @@
pluginManagement {
val isCI = System.getenv("GITHUB_ACTIONS") == "true"
repositories {
google {
content {
@ -9,23 +10,28 @@ pluginManagement {
}
mavenCentral()
gradlePluginPortal()
if (!isCI) {
maven("https://maven.aliyun.com/repository/gradle-plugin")
maven("https://maven.aliyun.com/repository/google")
maven("https://maven.aliyun.com/repository/public")
maven("https://repo.huaweicloud.com/repository/gradle-plugin/")
maven("https://repo.huaweicloud.com/repository/maven/")
}
}
}
dependencyResolutionManagement {
val isCI = System.getenv("GITHUB_ACTIONS") == "true"
repositoriesMode.set(RepositoriesMode.PREFER_PROJECT)
repositories {
google()
mavenCentral()
if (!isCI) {
maven("https://maven.aliyun.com/repository/google")
maven("https://maven.aliyun.com/repository/central")
maven("https://maven.aliyun.com/repository/public")
maven("https://repo.huaweicloud.com/repository/maven/")
}
}
}
rootProject.name = "RainyToken"