Skip to content

Commit b4c0537

Browse files
committed
Remove unused Gradle configuration
This commit removes unused parts of the Gradle build: * Gradle wrapper customization which should not be needed in recent versions of Gradle (or can be replaced with options in the gradle.properties file) * the branch strategy configuration See gh-23282
1 parent 2f61c89 commit b4c0537

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

build.gradle

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ ext {
5959

6060
configure(allprojects) { project ->
6161
group = "org.springframework"
62-
version = qualifyVersionIfNecessary(version)
6362

6463
apply plugin: "java"
6564
apply plugin: "kotlin"
@@ -288,33 +287,5 @@ configure(rootProject) {
288287
archives distZip
289288
}
290289

291-
wrapper {
292-
doLast() {
293-
def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"
294-
def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=256m"
295-
File wrapperFile = file("gradlew")
296-
wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
297-
"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
298-
File wrapperBatFile = file("gradlew.bat")
299-
wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=",
300-
"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
301-
}
302-
}
303290
}
304291

305-
/*
306-
* Support publication of artifacts versioned by topic branch.
307-
* CI builds supply `-P BRANCH_NAME=<TOPIC>` to gradle at build time.
308-
* If <TOPIC> starts with 'SPR-', change version
309-
* from BUILD-SNAPSHOT => <TOPIC>-SNAPSHOT
310-
* e.g. 3.2.1.BUILD-SNAPSHOT => 3.2.1.SPR-1234-SNAPSHOT
311-
*/
312-
def qualifyVersionIfNecessary(version) {
313-
if (rootProject.hasProperty("BRANCH_NAME")) {
314-
def qualifier = rootProject.getProperty("BRANCH_NAME")
315-
if (qualifier.startsWith("SPR-")) {
316-
return version.replace("BUILD", qualifier)
317-
}
318-
}
319-
return version
320-
}

0 commit comments

Comments
 (0)