Browse Source

Merge branch '3.5.x'

Closes gh-48158
pull/48170/head
Phillip Webb 1 month ago
parent
commit
7a8bc93fef
  1. 16
      buildSrc/SpringRepositorySupport.groovy
  2. 5
      buildSrc/build.gradle

16
buildSrc/SpringRepositorySupport.groovy

@ -87,8 +87,8 @@ class SpringRepositoriesExtension {
addRepositories { } addRepositories { }
} }
def mavenRepositories(condition) { def mavenRepositoriesFor(version) {
if (condition) addRepositories { } addRepositories(version) { }
} }
def mavenRepositoriesExcludingBootGroup() { def mavenRepositoriesExcludingBootGroup() {
@ -100,9 +100,13 @@ class SpringRepositoriesExtension {
} }
private void addRepositories(action) { private void addRepositories(action) {
addCommercialRepository("release", false, "/spring-enterprise-maven-prod-local", action) addRepositories(this.version, action)
if (this.version.endsWith("-SNAPSHOT")) { }
addCommercialRepository("snapshot", true, "/spring-enterprise-maven-dev-local", action)
private void addRepositories(version, action) {
addCommercialRepositoryIfNecessary("release", false, "/spring-enterprise-maven-prod-local", action)
if (version.endsWith("-SNAPSHOT")) {
addCommercialRepositoryIfNecessary("snapshot", true, "/spring-enterprise-maven-dev-local", action)
addOssRepository("snapshot", true, "/snapshot", action) addOssRepository("snapshot", true, "/snapshot", action)
} }
} }
@ -113,7 +117,7 @@ class SpringRepositoriesExtension {
addRepository(name, snapshot, url, action) addRepository(name, snapshot, url, action)
} }
private void addCommercialRepository(id, snapshot, path, action) { private void addCommercialRepositoryIfNecessary(id, snapshot, path, action) {
if (!"commercial".equalsIgnoreCase(this.buildType)) return if (!"commercial".equalsIgnoreCase(this.buildType)) return
def name = "spring-commercial-" + id def name = "spring-commercial-" + id
def url = fromEnv("COMMERCIAL_%SREPO_URL", id, "https://usw1.packages.broadcom.com" + path) def url = fromEnv("COMMERCIAL_%SREPO_URL", id, "https://usw1.packages.broadcom.com" + path)

5
buildSrc/build.gradle

@ -28,6 +28,7 @@ if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_24)) {
repositories { repositories {
mavenCentral() mavenCentral()
spring.mavenRepositoriesFor("${springFrameworkVersion}")
gradlePluginPortal() gradlePluginPortal()
} }
@ -36,10 +37,6 @@ java {
targetCompatibility = 17 targetCompatibility = 17
} }
repositories {
spring.mavenRepositories("${springFrameworkVersion}".contains("-"))
}
checkstyle { checkstyle {
toolVersion = "${checkstyleToolVersion}" toolVersion = "${checkstyleToolVersion}"
} }

Loading…
Cancel
Save