Simplify cache-redirector script apply method
Now it could be only be applied inside settings file pluginManagement block. This will update both settings repositories and all projects in the repo with cache redirection settings.
This commit is contained in:
+5
-17
@@ -1,4 +1,6 @@
|
||||
pluginManagement {
|
||||
apply from: 'repo/scripts/cache-redirector.settings.gradle.kts'
|
||||
|
||||
repositories {
|
||||
def pluginRepo = System.getProperty("bootstrap.kotlin.repo")
|
||||
if (pluginRepo != null) {
|
||||
@@ -6,15 +8,9 @@ pluginManagement {
|
||||
url pluginRepo
|
||||
}
|
||||
}
|
||||
|
||||
if (cacheRedirectorEnabled == 'true') {
|
||||
logger.info("Using cache redirector for settings.gradle pluginManagement")
|
||||
maven { url "https://cache-redirector.jetbrains.com/plugins.gradle.org/m2" }
|
||||
maven { url "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-dependencies" }
|
||||
} else {
|
||||
gradlePluginPortal()
|
||||
maven { url "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-dependencies" }
|
||||
}
|
||||
maven { url "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-dependencies" }
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
plugins {
|
||||
@@ -23,14 +19,6 @@ pluginManagement {
|
||||
}
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
if (cacheRedirectorEnabled == 'true') {
|
||||
maven { url "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-dependencies" }
|
||||
} else {
|
||||
maven { url "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-dependencies" }
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
def buildGradlePluginVersion = ext["kotlin.build.gradlePlugin.version"]
|
||||
dependencies {
|
||||
classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:${buildGradlePluginVersion}")
|
||||
|
||||
Reference in New Issue
Block a user