Commit Graph

259 Commits

Author SHA1 Message Date
Sam Brannen bd4ce3ec16 Upgrade to Gradle 7.4.2 2022-05-05 16:35:52 +02:00
Sam Brannen dd30da1282 Upgrade to Gradle 7.4.1 2022-03-20 11:24:02 +01:00
Brian Clozel 4c410cbe54 Remove toolchain configuration for Kotlin
Kotlin currently only supports JDK17 language level, which is our
minimum requirement so far.
This commit simplifies the toolchain setup until this is needed again.

See 303e363adf
2022-02-14 13:04:09 +01:00
Brian Clozel 303e363adf Configure Gradle JVM toolchain for Kotlin tasks 2022-02-14 11:47:16 +01:00
Brian Clozel 6c42bcfaec Upgrade to Kotlin 1.6.20-M1
This commit upgrades the Kotlin dependencies to 1.6.20-M1 and configures
the build to generate Java 17 bytecode for Kotlin classes.

Closes gh-27814
2022-02-11 11:39:32 +01:00
Brian Clozel 2019e176ee Upgrade to AspectJ 1.9.8
This commit also upgades the dedicated Gradle plugin for AspectJ build
integration.

Closes gh-27416
2022-02-11 11:13:52 +01:00
Sam Brannen 5c60a721a7 Upgrade to Gradle 7.4
Closes gh-28020
2022-02-08 16:26:37 +01:00
Sam Brannen 1dee80e750 Upgrade to Gradle 7.3.3 2022-01-03 15:59:37 +01:00
xixingya 5593e1e406
Fix javax.servlet doc to jakarta.servlet (#27692) 2021-11-17 11:29:54 +01:00
Brian Clozel ac694eeac8 Upgrade to Gradle 7.3 2021-11-10 19:40:39 +01:00
Sam Brannen 8e245e4410 Remove commented-out custom stylesheet for Javadoc
The team has decided to use the default Javadoc stylesheet with JDK 17.

Closes gh-27496
2021-10-20 13:07:45 +02:00
Sam Brannen f78d9cdf22 Remove configuration of obsolete html5 javadoc option 2021-10-19 16:58:36 +02:00
Sam Brannen aa5a2a8600 Disable custom stylesheet for Javadoc
The custom stylesheet used with JDK 8 no longer works with JDK 17.

Thus in order to make the generated Javadoc usable, we are disabling
the custom stylesheet for the time being.

See gh-27496
2021-10-19 16:42:22 +02:00
Sam Brannen 887ecffaa9 Merge branch '5.3.x' 2021-10-13 20:05:18 +02:00
Sam Brannen fcf4315e02 Indent with tabs instead of spaces 2021-10-13 20:04:40 +02:00
Sam Brannen c25aefdb2b Merge branch '5.3.x' 2021-10-05 15:24:11 +02:00
Sam Brannen 0e83466023 Reference Hamcrest Javadoc via javadoc.io
Due to an SSL/TLS issue with hamcrest.org, the Dokka task fails with the
following.

> Failed to download package-list from https://hamcrest.org/JavaHamcrest/javadoc/2.1/package-list,
> this might suggest that remote resource is not available, module is
> empty or dokka output got corrupted

See: https://github.com/hamcrest/JavaHamcrest/issues/280

As a workaround, this commit switches to javadoc.io to reference the
Hamcrest Javadoc APIs.
2021-10-05 15:23:44 +02:00
Sam Brannen 030ba52805 Merge branch '5.3.x' 2021-09-29 16:56:33 +02:00
Sam Brannen 96e4d3a530 Fail Gradle build for Javadoc warnings
In order to catch Javadoc errors in the build, we now enable the
`Xwerror` flag for the `javadoc` tool. In addition, we now use
`Xdoclint:syntax` instead of `Xdoclint:none` in order to validate
syntax within our Javadoc.

This commit fixes all resulting Javadoc errors and warnings.

This commit also upgrades to Undertow 2.2.12.Final and fixes the
artifact names for exclusions for the Servlet and annotations APIs.

The incorrect exclusion of the Servlet API resulted in the Servlet API
being on the classpath twice for the javadoc task, which resulted in the
following warnings in previous builds.

javadoc: warning - Multiple sources of package comments found for package "javax.servlet"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.http"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.descriptor"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.annotation"

Closes gh-27480
2021-09-29 14:02:37 +02:00
Sam Brannen a247b83cd9 Ensure projects can be imported into Eclipse IDE with JDK 17
Prior to this commit, the Spring Framework projects could not be
imported into Eclipse IDE when using JDK 17 to build the projects.

The primary obstacle is the fact that Eclipse enforces a strict
"no split packages between the unnamed module and a system module" rule
when building with a "modular JDK" (such as JDK 17).

Resources:

- https://bugs.eclipse.org/bugs/show_bug.cgi?id=536928
- https://bugs.openjdk.java.net/browse/JDK-8215739
- http://mail.openjdk.java.net/pipermail/jigsaw-dev/2018-December/014077.html
- https://stackoverflow.com/questions/51094274/eclipse-cant-find-xml-related-classes-after-switching-build-path-to-jdk-10/53824670#53824670

Since the bug (JDK-8215739) has not been fixed in OpenJDK, the strict
"no split packages" rule does not apply to the Java compiler used in
Spring Framework's Gradle build or the compiler in IntelliJ IDEA. Hence,
this issue only arrises when building the framework in Eclipse IDE.

This commit addresses this issue in the following affected projects.

- spring-oxm: removal of the dependency on XPP3 which publishes
    javax.xml.namespace.QName as part of the JAR. The QName type is
    also published by the java.xml JDK 17 system module. To make the
    tests pass, we have switched to using the DomDriver instead of the
    XppDriver in our XStream tests.

- spring-test: HtmlUnit has a transitive dependency on xml-apis which
    publishes several packages also published by java.xml JDK 17 system
    module. Thus, we have explicitly excluded the transitive dependency
    on xml-apis for our `optional` configuration.

See gh-27407
2021-09-22 16:22:27 +02:00
Sam Brannen d6570fa2ac Merge branch '5.3.x' 2021-09-21 12:39:38 +02:00
Sam Brannen b0dceb484a Remove Eclipse Web Tools Platform (WTP) configuration
Since the team no longer needs the ability to treat Eclipse projects as
WTP modules, this commit removes the obsolete custom WTP configuration
for importing projects into Eclipse IDE.

See gh-27407
2021-09-21 12:37:51 +02:00
Sam Brannen 01d82ef0c6 Merge branch '5.3.x' 2021-09-21 12:11:52 +02:00
Sam Brannen a37dde9a1c Revise Eclipse/STS Project Import Guide based on status quo
See gh-27407
2021-09-21 12:11:27 +02:00
Juergen Hoeller 0640da74bc Upgrade to Checkstyle 9.0, Groovy 3.0.9, Hibernate ORM 5.5.7
Includes downgrade of Kotlin language level to 1.8 (for KotlinScriptTemplateTests)
2021-09-15 15:26:13 +02:00
Brian Clozel c0e479460e Switch CI pipeline to a JDK17 baseline
This commit introduces a new `spring-framework-6.0.x` CI pipeline with
JDK 17 baseline.

Note that Kotlin still uses a JDK11 baseline for now, this will be
addressed in gh-27413.

Closes gh-27409
2021-09-15 12:37:10 +02:00
Sam Brannen 2d65bce18e Polish Eclipse IDE support 2021-09-14 21:59:32 +02:00
Sam Brannen 4322ee1944 Polish Eclipse IDE support 2021-09-14 21:42:00 +02:00
Sam Brannen 3faf445603 Re-enable import into Eclipse IDE
The migration to Gradle 7.2 resulted in a regression for our Eclipse
IDE support: several projects ended up with recursive classpath entries
in their generated .classpath files which prevent those projects from
being built within Eclipse.

This commit addresses this issue with a solution that may well be a
"hack". Nonetheless, a working hack is better than not being able to
import into Eclipse at all.

See gh-26870
2021-09-14 21:05:57 +02:00
Sam Brannen 9e986c031b Polish ide.gradle 2021-09-14 20:51:59 +02:00
Brian Clozel c02ae7bcb8 Fix noHttp failure 2021-09-13 10:14:58 +02:00
Brian Clozel ca34d0cce8 Polish Gradle upgrade
Closes gh-26870
2021-09-13 10:06:27 +02:00
Sébastien Deleuze ab41db474e Update dokka to 1.5.0
See gh-26870
2021-09-13 09:40:32 +02:00
Brian Clozel cecc0849a8 Upgrade to Gradle 7.2
This commit upgrades Gradle to 7.2.
Gradle configuration names are updated accordingly.
This also upgrades Gradle build plugins.

See gh-26870
2021-09-13 09:37:35 +02:00
Sam Brannen e7b499f7b6 Upgrade to JMH 1.32 and avoid accidental dependency on jopt-simple 4.6
JMH is now implicitly configured to use jopt-simple 5.0.4 instead of 4.6.

This problem was uncovered while fixing gh-27365
2021-09-07 10:45:44 +02:00
Sam Brannen 9c0825629b Reintroduce left-hand side navigation in ref docs
A side effect of 71995a9087 caused the
dynamic table of contents in the left-hand side navigation to no longer
be displayed, likely due to the missing "details" DIV.

This commit addresses this issue by applying the custom header only to
index.adoc.

Consequently, the TOC is now displayed again on all pages except the
index page, but the customized header is no longer applied to those
pages.

We may revisit this issue if we decide that we want the custom header
on all pages (and not just the index page).

Closes gh-27177
2021-07-17 17:53:43 +03:00
Arjen Poutsma b9d65eef61 Dropping accidentally inserted copyright notice 2021-07-07 13:54:07 +02:00
Arjen Poutsma 8d747298de Fixing the build 2021-07-07 13:49:10 +02:00
Sam Brannen 3214786757 Define global Asciidoc attributes once
This commit defines the doc-root and api-spring-framework attributes
once in docs.gradle instead of duplicating them in each *.adoc file.

This commit also introduces a new docs-spring-framework global
attribute.
2021-06-22 18:39:33 +02:00
Sam Brannen 71995a9087 Introduce custom header for HTML5 ref docs
This commit disables the automatic header generation from Asciidoc's
default template and replaces it with a custom header that omits the
"Version" label before the revision number. The revision number is also
displayed in a simple span tag in order to reduce the amount of
vertical space taken by the header.
2021-06-21 17:52:18 +02:00
Brian Clozel c7c35aff42 Fix missing attribute in reference documentation
This commit adds the missing `spring-framework-main-code` asciidoctor
attribute in the reference documentation.

Fixes gh-27041
2021-06-09 09:21:28 +02:00
Sam Brannen 38b592444d Store resolved toolchain info as custom values in build scan
Prior to this commit, we registered custom values in the build scan for
the main and test toolchains based on input values provided via the
mainToolchain and testToolchain project properties.

Beginning with this commit, the custom values we register are based on
the available metadata for the resolved JDK/JVM for each toolchain.

For example, instead of registering the following custom value...

Test toolchain : JDK11

... we now register the following which includes the vendor, version,
and installation path of the JDK/JVM.

Test toolchain : AdoptOpenJDK 11 (/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home)

Once Gradle's JavaInstallationMetadata includes the exact version, we
will likely use that instead of the installation path.

See gh-25787
2021-05-05 15:19:27 +02:00
Sam Brannen d30432b6c0 Fix syntax in toolchains example
See gh-25787
2021-05-04 18:42:21 +02:00
Sam Brannen 4152ebc2f3 Remove Eclipse resource filter for 'build' folder
Commit 3eec27a723 introduced a custom resource filter for projects
imported into Eclipse IDE. However, commit 85eb589c2e introduced
generated source files within the Gradle 'build' folder, and the filter
prevents Eclipse from seeing the generated sources, resulting in build
errors within the spring-oxm project in Eclipse.

This commit therefore effectively reverts 3eec27a723 by removing the
resource filter.

See gh-25787
2021-05-04 11:36:21 +02:00
Brian Clozel 85eb589c2e Fix Gradle Java Toolchain configuration
This commit fixes various issues with the configuration of the Gradle
Java toolchain in the build.

First, the configuration of build properties is fixed in the CI pipeline
because it wasn't properly checked.
The JMH plugin is also upgraded and we now configure its toolchain
support.
This commit also rewrites the XJC tasks in the spring-oxm module,
leveraging a Gradle plugin that creates actual compile tasks we can
configure.

See gh-25787
2021-05-03 15:02:09 +02:00
Brian Clozel 3ab39eda08 Fix Gradle Toolchain configuration
See gh-25787
2021-03-16 13:04:11 +01:00
Brian Clozel a8d553218c Introduce Gradle Toolchain support in build
Prior to this commit, the Spring Framework build would rely on
setting a custom Java HOME for building all sources and tests
with that JDK.

This approach is not flexible enough, since we would be testing
the source compatibility against a recent JDK, but not a common
case experienced by the community: compiling and running
application code with a recent JDK and the official, JDK8-based
Framework artifacts.
This method is also limiting our choice of JDKs to the ones
currently supported by Gradle itself.

This commit introduces the support of Gradle JVM Toolchains in
the Spring Framework build.

We can now select a specific JDK for compiling the main
SourceSets (Java, Groovy and Kotlin) and another one for
compiling and running the test SourceSets:

`./gradlew check -PmainToolChain=8 -PtestToolchain=15`

Gradle will automatically find the JDKs present on the host or
download one automcatically. You can find out about the ones
installed on your host using:

`./gradlew -q javaToolchains`

Finally, this commit also refactors the CI infrastructure to:

* only have a single CI image (with all the supported JDKs)
* use this new feature to compile with JDK8 but test it
against JDK11 and JDK15.

Closes gh-25787
2021-03-15 14:33:41 +01:00
Sam Brannen 42a223b9cd Upgrade to Gradle 6.8.3 2021-02-22 23:00:49 +01:00
Stephane Nicoll 7536b7f42a Upgrade to Gradle 6.8.2
Closes gh-26552
2021-02-15 16:57:49 +01:00
Sam Brannen 84eed00260 Upgrade to Gradle 6.8.1 2021-01-24 12:48:35 +01:00