Skip to content

Commit

Permalink
fix: update gradlePluginPortal workaround for JCenter availability is…
Browse files Browse the repository at this point in the history
…sue (#3861)

* Fixing workaround from #3784 which modified metadata sources in build.gradle's subprojects.repositories block, when it should have been made in settings.gradle's pluginManagement.repositories block instead.

* This changes dependency resolution to deprioritize gradle plugin portal (with JCenter workaround) in favour of maven central, given the latest availability issues encountered.
  • Loading branch information
emmileaf committed Nov 7, 2022
1 parent 7350042 commit 5035594
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 7 deletions.
8 changes: 1 addition & 7 deletions build.gradle
Expand Up @@ -70,13 +70,7 @@ subprojects {
group 'com.google.cloud.tools'

repositories {
mavenCentral {
metadataSources {
mavenPom()
artifact()
ignoreGradleMetadataRedirection()
}
}
mavenCentral()
}

apply plugin: 'java'
Expand Down
@@ -1,2 +1,8 @@
pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
}
}
rootProject.name = 'spring-boot'
rootProject.buildFileName = 'build-layered.gradle'
@@ -1 +1,7 @@
pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
}
}
rootProject.name = 'spring-boot'
@@ -1 +1,7 @@
pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
}
}
rootProject.name = 'spring-boot'
15 changes: 15 additions & 0 deletions settings.gradle
@@ -1,3 +1,18 @@
pluginManagement {
repositories {
mavenCentral()
// Workaround from: https://github.com/gradle/gradle/issues/15406#issuecomment-1020352934
gradlePluginPortal {
this as MavenArtifactRepository
metadataSources {
mavenPom()
artifact()
ignoreGradleMetadataRedirection()
}
}
}
}

include ":jib-build-plan"
include ":jib-plugins-extension-common"
include ":jib-gradle-plugin-extension-api"
Expand Down

0 comments on commit 5035594

Please sign in to comment.