Skip to content

Commit

Permalink
Unify both settings.gradle & buildSrc/build.gradle with repositories …
Browse files Browse the repository at this point in the history
…defined in gradle/repositories.settings.gradle (#1267)
  • Loading branch information
soywiz committed Feb 3, 2023
1 parent f47b78a commit c18b76d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
11 changes: 1 addition & 10 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions buildSrc/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
pluginManagement {
Eval.xy(this, it, file('../gradle/repositories.settings.gradle').text)
}

dependencyResolutionManagement {
versionCatalogs {
libs {
Expand Down
12 changes: 12 additions & 0 deletions gradle/repositories.settings.gradle
Original file line number Diff line number Diff line change
@@ -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/") }
}
9 changes: 1 addition & 8 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit c18b76d

Please sign in to comment.