fix: CI跳过国内Maven镜像,修复GitHub Actions构建失败
This commit is contained in:
parent
814ae61f01
commit
5e630c8895
@ -1,4 +1,5 @@
|
||||
pluginManagement {
|
||||
val isCI = System.getenv("GITHUB_ACTIONS") == "true"
|
||||
repositories {
|
||||
google {
|
||||
content {
|
||||
@ -9,6 +10,7 @@ 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")
|
||||
@ -16,17 +18,21 @@ pluginManagement {
|
||||
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"
|
||||
include(":app")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user