From c18b76d0166710db3c9894cdd7b0860842a23fa4 Mon Sep 17 00:00:00 2001 From: Carlos Ballesteros Velasco Date: Fri, 3 Feb 2023 16:00:07 +0100 Subject: [PATCH] Unify both settings.gradle & buildSrc/build.gradle with repositories defined in gradle/repositories.settings.gradle (#1267) --- buildSrc/build.gradle | 11 +---------- buildSrc/settings.gradle | 4 ++++ gradle/repositories.settings.gradle | 12 ++++++++++++ settings.gradle | 9 +-------- 4 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 gradle/repositories.settings.gradle diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 466531d723..0a05763056 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -22,16 +22,7 @@ dependencies { } } -repositories { - mavenLocal() - mavenCentral() - google() - maven { url = uri("https://plugins.gradle.org/m2/") } - maven { url = uri("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/temporary") } - maven { url = uri("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev") } - maven { url = uri("https://maven.pkg.jetbrains.space/public/p/kotlinx-coroutines/maven") } - maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") } -} +Eval.xy(this, this, file("../gradle/repositories.settings.gradle").text) tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { kotlinOptions.suppressWarnings = true diff --git a/buildSrc/settings.gradle b/buildSrc/settings.gradle index 6f31e6ef7c..e829a3ba53 100644 --- a/buildSrc/settings.gradle +++ b/buildSrc/settings.gradle @@ -1,3 +1,7 @@ +pluginManagement { + Eval.xy(this, it, file('../gradle/repositories.settings.gradle').text) +} + dependencyResolutionManagement { versionCatalogs { libs { diff --git a/gradle/repositories.settings.gradle b/gradle/repositories.settings.gradle new file mode 100644 index 0000000000..060b4276d3 --- /dev/null +++ b/gradle/repositories.settings.gradle @@ -0,0 +1,12 @@ +// x=Settings/Project +// y=PluginManagementSpec/Project +y.repositories { + mavenLocal() + mavenCentral() + google() + gradlePluginPortal() + maven { url = x.uri("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/temporary") } + maven { url = x.uri("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev") } + maven { url = x.uri("https://maven.pkg.jetbrains.space/public/p/kotlinx-coroutines/maven") } + maven { url = x.uri("https://oss.sonatype.org/content/repositories/snapshots/") } +} diff --git a/settings.gradle b/settings.gradle index 8a4fc1ab9d..778b4285da 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,12 +1,5 @@ pluginManagement { - repositories { - mavenLocal() - mavenCentral() - gradlePluginPortal() - maven { url = uri("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/temporary") } - maven { url = uri("https://maven.pkg.jetbrains.space/public/p/kotlinx-coroutines/maven") } - maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") } - } + Eval.xy(this, it, file('./gradle/repositories.settings.gradle').text) } rootProject.name = "${rootDir.name}-root"