mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-06-14 03:32:00 +08:00
ci: 完善构建流程和中国网络环境加速
This commit is contained in:
@@ -1,5 +1,16 @@
|
||||
pluginManagement {
|
||||
fun isEnabled(value: String?): Boolean = when (value?.lowercase()) {
|
||||
"1", "true", "yes", "on" -> true
|
||||
else -> false
|
||||
}
|
||||
val mirrorAcceleration = isEnabled(System.getenv("CHINAMIRRO"))
|
||||
|
||||
repositories {
|
||||
if (mirrorAcceleration) {
|
||||
maven("https://maven.aliyun.com/repository/google")
|
||||
maven("https://maven.aliyun.com/repository/public")
|
||||
maven("https://maven.aliyun.com/repository/gradle-plugin")
|
||||
}
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
@@ -7,8 +18,18 @@ pluginManagement {
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
fun isEnabled(value: String?): Boolean = when (value?.lowercase()) {
|
||||
"1", "true", "yes", "on" -> true
|
||||
else -> false
|
||||
}
|
||||
val mirrorAcceleration = isEnabled(System.getenv("CHINAMIRRO"))
|
||||
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
if (mirrorAcceleration) {
|
||||
maven("https://maven.aliyun.com/repository/google")
|
||||
maven("https://maven.aliyun.com/repository/public")
|
||||
}
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user