Browse Source

Merge branch '3.5.x'

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

16
buildSrc/SpringRepositorySupport.groovy

@ -87,8 +87,8 @@ class SpringRepositoriesExtension { @@ -87,8 +87,8 @@ class SpringRepositoriesExtension {
addRepositories { }
}
def mavenRepositories(condition) {
if (condition) addRepositories { }
def mavenRepositoriesFor(version) {
addRepositories(version) { }
}
def mavenRepositoriesExcludingBootGroup() {
@ -100,9 +100,13 @@ class SpringRepositoriesExtension { @@ -100,9 +100,13 @@ class SpringRepositoriesExtension {
}
private void addRepositories(action) {
addCommercialRepository("release", false, "/spring-enterprise-maven-prod-local", action)
if (this.version.endsWith("-SNAPSHOT")) {
addCommercialRepository("snapshot", true, "/spring-enterprise-maven-dev-local", action)
addRepositories(this.version, 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)
}
}
@ -113,7 +117,7 @@ class SpringRepositoriesExtension { @@ -113,7 +117,7 @@ class SpringRepositoriesExtension {
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
def name = "spring-commercial-" + id
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)) { @@ -28,6 +28,7 @@ if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_24)) {
repositories {
mavenCentral()
spring.mavenRepositoriesFor("${springFrameworkVersion}")
gradlePluginPortal()
}
@ -36,10 +37,6 @@ java { @@ -36,10 +37,6 @@ java {
targetCompatibility = 17
}
repositories {
spring.mavenRepositories("${springFrameworkVersion}".contains("-"))
}
checkstyle {
toolVersion = "${checkstyleToolVersion}"
}

Loading…
Cancel
Save