Commit Graph

320 Commits

Author SHA1 Message Date
Stéphane Nicoll
206d81ee08 Merge branch '6.1.x' 2024-07-04 10:26:46 +02:00
Stéphane Nicoll
dfa6b4bd42 Upgrade to Gradle 8.8
Closes gh-33146
2024-07-04 10:23:15 +02:00
rstoyanchev
5787bc569d Merge branch '6.1.x' 2024-06-10 10:48:49 +01:00
rstoyanchev
3b13f2ed38 Update code-of-conduct email 2024-06-10 10:48:06 +01:00
Sam Brannen
489d18a169 Merge branch '6.1.x' 2024-05-24 15:42:39 +02:00
Sam Brannen
ea2931f24a Use Develocity Gradle plugin API to avoid deprecation warning
Prior to this commit, the Gradle build issued the following warning.

- The deprecated "gradleEnterprise.buildScan.value" API has been
  replaced by "develocity.buildScan.value"
2024-05-24 15:41:58 +02:00
Sam Brannen
19792f9670 Merge branch '6.1.x' 2024-05-12 12:32:20 +02:00
Sam Brannen
7536980be9 Fix Dokka links to Spring Framework and Servlet APIs
This commit fixes links from Spring Framework's Dokka HTML to Javadoc
for Spring Framework and Servlet APIs by explicitly configuring the
`element-list` page as the `package-list` in the Dokka Gradle plugin.

Closes gh-32797
2024-05-12 12:29:52 +02:00
Sébastien Deleuze
12272d6e41 Remove unneeded @SuppressWarnings("NullAway")
Closes gh-32542
2024-05-06 18:28:54 +02:00
Stéphane Nicoll
e3281a527c Merge branch '6.1.x' 2024-04-02 18:01:59 +02:00
Stéphane Nicoll
08c9b5c96c Upgrade to Gradle 8.7
Closes gh-32566
2024-04-02 18:01:37 +02:00
Sébastien Deleuze
996e66abdb Perform NullAway build-time checks in spring-test
Closes gh-32475
2024-03-26 18:14:56 +01:00
Sébastien Deleuze
8b51b36729 Perform NullAway build-time checks in more modules
This commit enables null-safety build-time checks in
all remaining modules except spring-test.

See gh-32475
2024-03-26 15:53:01 +01:00
Sébastien Deleuze
5b660da52d Perform NullAway build-time checks in more modules
This commit enables null-safety build-time checks in:
 - spring-jdbc
 - spring-r2dbc
 - spring-orm
 - spring-beans
 - spring-aop

See gh-32475
2024-03-26 09:59:30 +01:00
Sébastien Deleuze
7c009ccc1f Perform NullAway build-time checks in spring-messaging
See gh-32475
2024-03-25 12:30:03 +01:00
Sébastien Deleuze
2fc78dfb69 Perform NullAway build-time checks in spring-jms
See gh-32475
2024-03-25 11:27:04 +01:00
Sébastien Deleuze
e52ee01ec8 Perform NullAway build-time checks in spring-web
Also in spring-websocket.

See gh-32475
2024-03-25 11:11:09 +01:00
Sébastien Deleuze
0e7aba4179 Perform NullAway build-time checks in spring-webmvc
See gh-32475
2024-03-22 17:49:03 +01:00
Sébastien Deleuze
0a50854e1a Perform NullAway build-time checks in spring-webflux
See gh-32475
2024-03-22 16:09:18 +01:00
Sébastien Deleuze
f648fd7c3b Perform NullAway build-time checks in spring-expression
See gh-32475
2024-03-20 10:10:00 +01:00
Sébastien Deleuze
4c7735016b Refine null-safety with NullAway build-time checks
This commit introduces null-safety checks for spring-core at build-time
in order to validate the consistency of Spring null-safety annotations
and generate errors when inconsistencies are detected during a build
(similar to what is done with Checkstyle).

In order to make that possible, this commit also introduces a new
org.springframework.lang.Contract annotation inspired from
org.jetbrains.annotations.Contract, which allows to specify semantics
of methods like Assert#notNull in order to prevent artificial
additional null checks in Spring Framework code base.

This commit only checks org.springframework.core package, follow-up
commits will also extend the analysis to other modules, after related
null-safety refinements.

See gh-32475
2024-03-19 16:30:32 +01:00
Stéphane Nicoll
8d601384d3 Upgrade to Gradle 8.6
Closes gh-32192
2024-02-03 11:38:56 +01:00
Werner Fouché
68864674cc Upgrade to JMH 1.37
See gh-32015
2024-01-12 08:40:47 +01:00
Sam Brannen
3a53446a2b Upgrade to Gradle 8.5
Closes gh-31734
2023-12-01 15:37:55 +01:00
Sam Brannen
12078e6ec5 Ensure Java runtime container is always properly configured in Eclipse 2023-11-04 14:32:34 +01:00
Sam Brannen
8770544769 Remove classpath entries for non-existent libraries added by mrjar plugin
The me.champeau.mrjar Gradle plugin causes non-existent libraries to be
added to the Eclipse classpath, such as:

<classpathentry kind="lib" path="/workspaces/spring-framework/spring-core/build/classes/kotlin/java21">
  <attributes>
    <attribute name="gradle_used_by_scope" value="java21"/>
    <attribute name="test" value="true"/>
  </attributes>
</classpathentry>

This results in build errors in Eclipse IDE like the following.

Project 'spring-core' is missing required library:
  '/workspaces/spring-framework/spring-core/build/classes/kotlin/java21'

This commit filters those and removes them.
2023-10-29 12:03:40 +01:00
Sam Brannen
fc77172d67 Remove recursive project dependencies from Eclipse classpath 2023-10-29 11:25:53 +01:00
Sam Brannen
de74520286 Upgrade to JMH plugin 0.7.2
Closes gh-31517
2023-10-29 11:09:48 +01:00
Brian Clozel
c73c16f07f Configure JDK 22 compatibility build on CI
This commit does not enable this build right now as testing libraries
are not ready yet for JDK 22.

See gh-31459
2023-10-19 13:59:13 +02:00
Sam Brannen
af4652db36 Merge branch '6.0.x' 2023-10-08 16:24:53 +02:00
Sam Brannen
9df4bce043 Upgrade to Gradle 8.4
Closes gh-31375
2023-10-08 16:08:29 +02:00
Sam Brannen
f43f1e12f1 Merge branch '6.0.x' 2023-08-17 17:59:30 +02:00
Sam Brannen
957eb021d7 Upgrade to Gradle 8.3
Closes gh-31061
2023-08-17 17:32:05 +02:00
Sam Brannen
1364a179a9 Upgrade to Gradle 8.2
Closes gh-30791
2023-07-03 16:24:34 +02:00
Sam Brannen
ea9c217827 Merge branch '6.0.x' 2023-07-03 16:37:35 +02:00
Simon Baslé
f5bc084ce2 Merge branch '6.0.x' (javadoc changes) 2023-05-16 15:05:42 +02:00
Simon Baslé
eabb846d07 Improve how the build deals with javadoc invalid references
This commit improves how the build deals with javadoc invalid references
in two ways.

Link/see references that are temporarily invalid during javadoc
generation of individual modules are better masked by using the option
`Xdoclint:syntax` instead of `Xdoclint:none` (warnings were still
visible in some cases, e.g. when individually building the javadoc for
a specific module).

Global javadoc-building task `api` now combines `syntax` and `reference`
`Xdoclint` groups, allowing to raise truly invalid references even when
all the modules have been aggregated.

This commit also fixes the 20+ errors which appeared following the later
change in doclet configuration.

Closes gh-30428
2023-05-16 15:04:10 +02:00
Sam Brannen
05e4234525 Merge branch '6.0.x' 2023-04-25 19:52:06 +02:00
Sam Brannen
3b8a9b18f9 Upgrade to Gradle 8.1.1
Closes gh-30351
2023-04-25 19:51:54 +02:00
Brian Clozel
5c574b9878 Refactor toolchain support in Gradle build
This commit removes the `-PmainToolchain` option from our build, since
it was not broadly used. Instead, the language level is now configured
in the `JavaConventions` for JDK 17.

The `-PtestToolchain` option is still available for testing Spring
Framework with other JDKs (i.e., compiling and running tests with a JDK
that's not the baseline).

See gh-30339
2023-04-14 10:30:12 +02:00
Sam Brannen
4a90257a84 Upgrade to Gradle 8
This commit upgrades the build to use Gradle 8.0.2 and Dokka 1.8.10.

Closes gh-30000
2023-04-01 18:36:28 +02:00
Sam Brannen
84714fbae9 Allow JDK 20 builds to pass by using legacy locale data
After setting up a JDK 20 CI build pipeline, numerous tests involving
date/time parsing and formatting began to fail [0]. (The failing JPA
tests are not specific to JDK 20.)

For example, we encounter visually confusing assertion failures such as
the following.

org.opentest4j.AssertionFailedError:
	expected: "12:00 PM"
	but was:  "12:00 PM"

The expected string contains a normal space (which has always been the
case prior to JDK 20); whereas, the actual string now contains a narrow
non-breaking space.

The cause of this is mentioned in the JDK 20 Release Notes [1] as "NBSP
prefixed to a, instead of a normal space". Note, however, that the
links for the first two bullet points in that section are mixed up.
"NBSP prefixed to a, instead of a normal space" should point to [2].
Furthermore, the new whitespace character is not a non-breaking space
(NBSP) but rather a narrow non-breaking space (NNBSP). In addition, the
second bullet point should technically read "NNBSP prefixed to `a`,
instead of a normal space" -- even though `a` provides limited value to
most readers.

The downside for the Java community is that this constitutes a breaking
change for parsing and formatting date/time values that include "AM"
and "PM" units (any may potentially apply to other date/time
parsing/formatting scenarios). In Spring Framework's test suite we have
witnessed this in conjunction with Spring's @DateTimeFormat and
DateTimeFormatterFactory infrastructure as well as with Google's
Gson-to-JSON support.

A colleague who works at Oracle graciously informed me that one can use
"legacy locale data" by supplying `-Djava.locale.providers=COMPAT` as a
JVM argument, noting however that this option limits some newer
functionalities (but without enumerating which new functionalities one
might be missing when using this option).

In any case, this commit adds that JVM argument to our Gradle toolchain
builds so that our test suite passes on JDK 20, and we will continue to
investigate further options for our builds and for our users.

Note, however, that one must manually configure the
`-Djava.locale.providers=COMPAT` JVM argument when running affected
tests within an IDE.

See gh-30185

[0] https://ge.spring.io/s/kmiq2bz2afafs/tests/overview?outcome=failed
[1] https://jdk.java.net/20/release-notes#JDK-8284840
[2] https://unicode-org.atlassian.net/browse/CLDR-14032
2023-03-24 16:08:38 +01:00
Sam Brannen
18adf905a8 Polishing 2023-03-23 17:04:41 +01:00
Brian Clozel
e725e3a51b Update Java versions and remove Java 18 build 2023-01-19 09:40:25 +01:00
Brian Clozel
e9ada8d15c Upgrade JMH build plugins
This commit upgrades the Gradle JMH plugin to 0.6.8 and the companion
JMH version to 1.36.
2022-12-05 13:02:11 +01:00
Sam Brannen
902f8dd1d8 Upgrade Gradle wrapper
See gh-29583
2022-11-25 23:12:08 +01:00
Juergen Hoeller
22f8ea61fb Upgrade to Gradle 7.6
Closes gh-29583
2022-11-25 22:33:09 +01:00
Brian Clozel
acd9016fc3 Create framework-docs module
This commit creates a new "framework-docs" module, which is dedicated to
documentation generation (reference and API docs).
This commit refactors the build configuration and moves the asciidoc
files to a separate location, but does not change the name nor the
nature of published artifacts.

Closes gh-29417
2022-11-02 10:59:12 +01:00
Brian Clozel
6b0f6e9f27 Apply Gradle Test Retry plugin
The plugin is configured to detect flaky tests and retry them 3 times
when running on the CI, but still reports failures. This will provide a
standard way to detect flaky tests as failures and successful attempts
are shown in the tests report.
2022-10-06 13:54:28 +02:00
Brian Clozel
8e24797d37 Merge branch '5.3.x' 2022-09-30 14:42:00 +02:00