Skip to content

Commit 33c10e1

Browse files
authored
Merge pull request #14770 from apache/singleGroovy
Adopting Spring Boot 3.5.0 & Fixes for Unified Groovy version
2 parents d298468 + 9cd4301 commit 33c10e1

16 files changed

+53
-122
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ For further information, please consult the [documentation](https://docs.grails.
110110

111111
## Building Grails
112112

113-
For building Grails, please consult the [CONTRIBUTING.md](CONTRIBUTING.md) file.
113+
For detailed building Grails, please consult the [CONTRIBUTING.md](CONTRIBUTING.md) file. To bootstrap the project from a source distribution, you can execute:
114+
115+
gradle wrapper
116+
117+
Then you can proceed with running any valid gradle command from [CONTRIBUTING.md](CONTRIBUTING.md).
114118

115119
## Licensing
116120

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ subprojects {
9191
}
9292

9393
apply {
94+
from layout.projectDirectory.file('gradle/gradle-wrapper-root-config.gradle')
9495
from layout.projectDirectory.file('gradle/publish-root-config.gradle')
9596
from layout.projectDirectory.file('gradle/rat-root-config.gradle')
9697
}

dependencies.gradle

Lines changed: 4 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -42,33 +42,8 @@ ext {
4242
'objenesis.version' : '3.4',
4343
'gradle-spock.version' : '2.3-groovy-3.0',
4444
'gradle-nexus-publish-plugin.version': '2.0.0',
45-
'spring-boot.version' : '3.5.0-RC1',
45+
'spring-boot.version' : '3.5.0',
4646
'springloaded.version' : '1.2.8.RELEASE',
47-
// Because 3.5.0-RC1 contains 6.2.6 instead of 6.2.7, we need to override the various spring versions
48-
// https://github.com/spring-projects/spring-framework/issues/34796 which prevents running apps via jar (nested jar failures)
49-
'spring-websocket.version' : '6.2.7',
50-
'spring-webmvc.version' : '6.2.7',
51-
'spring-webflux.version' : '6.2.7',
52-
'spring-web.version' : '6.2.7',
53-
'spring-tx.version' : '6.2.7',
54-
'spring-test.version' : '6.2.7',
55-
'spring-r2dbc.version' : '6.2.7',
56-
'spring-oxm.version' : '6.2.7',
57-
'spring-orm.version' : '6.2.7',
58-
'spring-messaging.version' : '6.2.7',
59-
'spring-jms.version' : '6.2.7',
60-
'spring-jdbc.version' : '6.2.7',
61-
'spring-jcl.version' : '6.2.7',
62-
'spring-instrument.version' : '6.2.7',
63-
'spring-expression.version' : '6.2.7',
64-
'spring-core-test.version' : '6.2.7',
65-
'spring-core.version' : '6.2.7',
66-
'spring-context-support.version' : '6.2.7',
67-
'spring-context-indexer.version' : '6.2.7',
68-
'spring-context.version' : '6.2.7',
69-
'spring-beans.version' : '6.2.7',
70-
'spring-aspects.version' : '6.2.7',
71-
'spring-aop.version' : '6.2.7',
7247
]
7348

7449
// Note: the name of the dependency must be the prefix of the property name so properties in the pom are resolved correctly
@@ -99,31 +74,6 @@ ext {
9974
'spring-boot-cli' : "org.springframework.boot:spring-boot-cli:${gradleBomDependencyVersions['spring-boot.version']}",
10075
'spring-boot-gradle' : "org.springframework.boot:spring-boot-gradle-plugin:${gradleBomDependencyVersions['spring-boot.version']}",
10176
'springloaded' : "org.springframework:springloaded:${gradleBomDependencyVersions['springloaded.version']}",
102-
// Because 3.5.0-RC1 contains 6.2.6 instead of 6.2.7, we need to override the various spring versions
103-
// https://github.com/spring-projects/spring-framework/issues/34796 which prevents running apps via jar (nested jar failures)
104-
'spring-websocket' : "org.springframework:spring-websocket:${gradleBomDependencyVersions['spring-websocket.version']}",
105-
'spring-webmvc' : "org.springframework:spring-webmvc:${gradleBomDependencyVersions['spring-webmvc.version']}",
106-
'spring-webflux' : "org.springframework:spring-webflux:${gradleBomDependencyVersions['spring-webflux.version']}",
107-
'spring-web' : "org.springframework:spring-web:${gradleBomDependencyVersions['spring-web.version']}",
108-
'spring-tx' : "org.springframework:spring-tx:${gradleBomDependencyVersions['spring-tx.version']}",
109-
'spring-test' : "org.springframework:spring-test:${gradleBomDependencyVersions['spring-test.version']}",
110-
'spring-r2dbc' : "org.springframework:spring-r2dbc:${gradleBomDependencyVersions['spring-r2dbc.version']}",
111-
'spring-oxm' : "org.springframework:spring-oxm:${gradleBomDependencyVersions['spring-oxm.version']}",
112-
'spring-orm' : "org.springframework:spring-orm:${gradleBomDependencyVersions['spring-orm.version']}",
113-
'spring-messaging' : "org.springframework:spring-messaging:${gradleBomDependencyVersions['spring-messaging.version']}",
114-
'spring-jms' : "org.springframework:spring-jms:${gradleBomDependencyVersions['spring-jms.version']}",
115-
'spring-jdbc' : "org.springframework:spring-jdbc:${gradleBomDependencyVersions['spring-jdbc.version']}",
116-
'spring-jcl' : "org.springframework:spring-jcl:${gradleBomDependencyVersions['spring-jcl.version']}",
117-
'spring-instrument' : "org.springframework:spring-instrument:${gradleBomDependencyVersions['spring-instrument.version']}",
118-
'spring-expression' : "org.springframework:spring-expression:${gradleBomDependencyVersions['spring-expression.version']}",
119-
'spring-core-test' : "org.springframework:spring-core-test:${gradleBomDependencyVersions['spring-core-test.version']}",
120-
'spring-core' : "org.springframework:spring-core:${gradleBomDependencyVersions['spring-core.version']}",
121-
'spring-context-support' : "org.springframework:spring-context-support:${gradleBomDependencyVersions['spring-context-support.version']}",
122-
'spring-context-indexer' : "org.springframework:spring-context-indexer:${gradleBomDependencyVersions['spring-context-indexer.version']}",
123-
'spring-context' : "org.springframework:spring-context:${gradleBomDependencyVersions['spring-context.version']}",
124-
'spring-beans' : "org.springframework:spring-beans:${gradleBomDependencyVersions['spring-beans.version']}",
125-
'spring-aspects' : "org.springframework:spring-aspects:${gradleBomDependencyVersions['spring-aspects.version']}",
126-
'spring-aop' : "org.springframework:spring-aop:${gradleBomDependencyVersions['spring-aop.version']}",
12777
]
12878

12979
bomDependencyVersions = [
@@ -132,7 +82,9 @@ ext {
13282
'bootstrap.version' : '5.3.3',
13383
'commons-codec.version' : '1.17.1',
13484
'geb-spock.version' : '7.0',
135-
'groovy.version' : '4.0.26',
85+
// vote is starting soon on 4.0.27-SNAPSHOT and we require this for M4
86+
// this is a temporary workaround so we can test the release process
87+
'groovy.version' : '4.0.27-SNAPSHOT',
13688
'h2.version' : '2.3.232',
13789
'jackson.version' : '2.18.2',
13890
'jquery.version' : '3.7.1',

etc/bin/test-reproducible-builds.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ cd "${SCRIPT_DIR}/../.."
2828
rm -rf "${SCRIPT_DIR}/results" || true
2929
mkdir -p "${SCRIPT_DIR}/results"
3030

31-
git clean -xdf --exclude='etc/bin'
31+
git clean -xdf --exclude='etc/bin' --exclude='.idea' --exclude='.gradle'
3232
killall -e java || true
3333
cd grails-gradle
3434
./gradlew build --rerun-tasks -PskipTests --no-build-cache
@@ -38,7 +38,7 @@ cd ..
3838
mkdir -p "${SCRIPT_DIR}/results/first"
3939
find . -path ./etc -prune -o -type f -path '*/build/libs/*.jar' -print0 | xargs -0 cp --parents -t "${SCRIPT_DIR}/results/first/"
4040

41-
git clean -xdf --exclude='etc/bin'
41+
git clean -xdf --exclude='etc/bin' --exclude='.idea' --exclude='.gradle'
4242
killall -e java || true
4343
cd grails-gradle
4444
./gradlew build --rerun-tasks -PskipTests --no-build-cache

etc/bin/verify-distribution.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ else
4040
exit 1
4141
fi
4242

43-
git clean -xdf --exclude='etc/bin'
43+
git clean -xdf --exclude='etc/bin' --exclude='.idea' --exclude='.gradle'
4444
killall -e java || true
4545
cd grails-gradle
4646
./gradlew build --rerun-tasks -PskipTests --no-build-cache

gradle.properties

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ org.gradle.caching=true
4949
# org.gradle.configuration-cache=true
5050
org.gradle.parallel=true
5151
org.gradle.daemon=true
52-
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1792M -XX:MaxMetaspaceSize=1024M
52+
# do NOT turn on due to https://github.com/gradle/gradle/issues/9489
53+
#org.gradle.configureondemand=true
54+
# note: groovydoc requires almost a doubling of this memory; if it could run in a process isolation, we could reduce this
55+
# this is a future TODO see groovydoc-tool-rewrite branch for experiementations with this
56+
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx5G -XX:MaxMetaspaceSize=2G
5357

5458
# libraries only specific to test apps, these should not be exposed
5559
jbossTransactionApiVersion=2.0.0.Final

gradle/docs-config.gradle

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,4 @@ apply from: rootProject.layout.projectDirectory.file('gradle/docs-dependencies.g
2121

2222
ext {
2323
includeInApiDocs = true
24-
}
25-
26-
tasks.named('groovydoc', Groovydoc).configure { Groovydoc it ->
27-
// TODO: Fix this for testFixtures
28-
it.classpath = configurations.documentation
29-
it.groovyClasspath = configurations.documentation
30-
it.access = GroovydocAccess.PROTECTED
31-
it.includeAuthor = false
32-
it.includeMainForScripts = false
33-
it.processScripts = false
34-
it.noTimestamp = true
3524
}

gradle/docs-dependencies.gradle

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,11 @@ dependencies {
3131
add('documentation', 'org.fusesource.jansi:jansi')
3232
add('documentation', 'jline:jline')
3333
add('documentation', 'com.github.javaparser:javaparser-core')
34-
35-
/*
36-
Temporarily use 4.0.27-SNAPSHOT for documentation generation until 4.0.27 is released.
3734
add('documentation', 'org.apache.groovy:groovy')
3835
add('documentation', 'org.apache.groovy:groovy-groovydoc')
3936
add('documentation', 'org.apache.groovy:groovy-ant')
4037
add('documentation', 'org.apache.groovy:groovy-docgenerator')
4138
add('documentation', 'org.apache.groovy:groovy-templates')
42-
*/
43-
add('documentation', 'org.apache.groovy:groovy:4.0.27-SNAPSHOT')
44-
add('documentation', 'org.apache.groovy:groovy-groovydoc:4.0.27-SNAPSHOT')
45-
add('documentation', 'org.apache.groovy:groovy-ant:4.0.27-SNAPSHOT')
46-
add('documentation', 'org.apache.groovy:groovy-docgenerator:4.0.27-SNAPSHOT')
47-
add('documentation', 'org.apache.groovy:groovy-templates:4.0.27-SNAPSHOT')
4839
}
4940

5041
String resolveProjectVersion(String artifact) {
@@ -65,9 +56,10 @@ tasks.withType(Groovydoc).configureEach { Groovydoc gdoc ->
6556
gdoc.windowTitle = "${project.findProperty('pomArtifactId') ?: project.name} - $projectVersion"
6657
gdoc.docTitle = "${project.findProperty('pomArtifactId') ?: project.name} - $projectVersion"
6758
gdoc.access = GroovydocAccess.PROTECTED
68-
gdoc.includeAuthor = true
59+
gdoc.includeAuthor = false
6960
gdoc.includeMainForScripts = false
7061
gdoc.processScripts = false
62+
gdoc.noTimestamp = true
7163

7264
doFirst {
7365
def gebVersion = resolveProjectVersion('geb-spock')
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* https://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
def props = new Properties()
20+
project.rootProject.layout.projectDirectory.file('.sdkmanrc').asFile.withInputStream {
21+
props.load(it)
22+
}
23+
tasks.withType(Wrapper).configureEach {
24+
gradleVersion = props.gradle
25+
}

gradle/java-config.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ tasks.withType(GroovyCompile).configureEach {
3838
groovyOptions.parameters = true
3939
options.encoding = 'UTF-8' // encoding needs to be the same since it's different across platforms
4040
options.fork = true
41-
options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx1G']
41+
options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx2G']
4242
}
4343

4444
// Grails determines the grails version via the META-INF/MANIFEST.MF file

0 commit comments

Comments
 (0)