Commit Graph

221 Commits

Author SHA1 Message Date
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
Sam Brannen 3112dc5f81 Improve JMH Jar configuration 2021-01-12 12:27:54 +01:00
Sam Brannen 6b9d5698ce Upgrade to JMH 1.25 2021-01-12 12:27:54 +01:00
Sam Brannen 6ea39fd122 Upgrade to Gradle 6.8
Closes gh-26368
2021-01-12 10:42:07 +01:00
Brian Clozel 3b92d45984 Upgrade reference docs dependencies
This commit upgrades the spring-doc-resources dependency to 0.2.5
and the spring-asciidoctor-extensions-block-switch to 0.5.0
2020-12-08 11:38:39 +01:00
Stephane Nicoll da15fe4c94 Upgrade to Gradle 6.7.1
Closes gh-26225
2020-12-07 10:43:22 +01:00
Sam Brannen fd70a9e95d Fix comment
See gh-26140
2020-11-23 17:42:49 +01:00
Sam Brannen 298cb22bfe Ensure that projects can be imported into Eclipse IDE
Recently the Spring Framework projects could no longer be imported into
Eclipse IDE without compilation errors in JMH sources.

This commit addresses this issue by applying workarounds for bugs in
Gradle and the JMH plugin for Gradle.

Gradle bug: https://github.com/gradle/gradle/issues/14932

JMH plugin bug: https://github.com/melix/jmh-gradle-plugin/issues/157

The Gradle bug has already been fixed in Gradle 6.8 RC1; however, the
issue for the JMH plugin bug seems not to have been triaged yet.

Closes gh-26140
2020-11-23 17:24:57 +01:00
Sébastien Deleuze 4503260282 Fix Dokka warnings 2020-10-27 11:21:55 +01:00
Sam Brannen 57ac32b808 Upgrade to Gradle 6.7
Closes gh-25918
2020-10-15 13:48:50 +02:00
Sam Brannen 00651a3e38 Fix forward-merge errors in 6f04c7b60e and 687c3985d5
See gh-24865
2020-09-25 11:22:29 +02:00
Brian Clozel 687c3985d5 Fix merge-forward 2020-09-24 19:54:04 +02:00
Brian Clozel 6f04c7b60e Merge branch '5.2.x' 2020-09-24 18:11:32 +02:00
Brian Clozel a532c527dd Fix missing reference doc from docs archive
Prior to this commit, the `docsZip` task would not reference the new
output locations for the `asciidoctor` and `asciidoctorPdf` tasks.
This results with missing reference docs in the docs zip.

This commit updates the input locations of the Zip task to include the
produced reference docs.

Fixes gh-25783
2020-09-24 17:49:37 +02:00
Brian Clozel 6e7be76278 Upgrade to AsciidoctorJ 3.1.0
Closes gh-24991
2020-09-23 10:06:13 +02:00
Sam Brannen 2342f5f48a Remove unnecessary folders and files from PDF reference documentation
Prior to this commit, the asciidoctor Gradle task was configured to
generate both the HTML5 and PDF backends. Unfortunately, this resulted
in resources such as HTML, JavaScript, CSS, and images being published
alongside the generated PDF documents.

This commit addresses this issue by introducing the use of a dedicated
asciidoctorPdf Gradle task. The existing asciidoctor Gradle task has
been modified to only generate HTML5 output. Both of these tasks now
share common configuration supplied by the updated asciidoctorj Gradle
task.

In addition, the asciidoctor task now depends on the asciidoctorPdf
task. Thus, invoking `./gradlew asciidoctor` will still generate both
the HTML5 and PDF outputs; whereas, `./gradlew asciidoctorPdf` will
generate only the PDF outputs. We may later decide to rework the tasks
to introduce a dedicated asciidoctorHtml task so that we can generate
the HTML outputs without having to generate the PDF outputs (which are
more time consuming).

See gh-25783
2020-09-21 11:43:08 +02:00
Sam Brannen 4179ea6f22 Remove unnecessary folders and files from PDF reference documentation
Prior to this commit, the asciidoctor Gradle task was configured to
generate both the HTML5 and PDF backends. Unfortunately, this resulted
in resources such as HTML, JavaScript, CSS, and images being published
alongside the generated PDF documents.

This commit addresses this issue by introducing the use of a dedicated
asciidoctorPdf Gradle task. The existing asciidoctor Gradle task has
been modified to only generate HTML5 output. Both of these tasks now
share common configuration supplied by the updated asciidoctorj Gradle
task.

In addition, the asciidoctor task now depends on the asciidoctorPdf
task. Thus, invoking `./gradlew asciidoctor` will still generate both
the HTML5 and PDF outputs; whereas, `./gradlew asciidoctorPdf` will
generate only the PDF outputs. We may later decide to rework the tasks
to introduce a dedicated asciidoctorHtml task so that we can generate
the HTML outputs without having to generate the PDF outputs (which are
more time consuming).

See gh-25783
2020-09-18 18:10:28 +02:00
Sébastien Deleuze 0db3f2b4de Publish documentation under reference/html folder
This is done:
 - For consistency with other Spring projects
 - Because it is probably a better option to use reference instead of
   spring-framework-reference (spring-framework is already present in
   the URL)
 - To improve PDF documentation discoverability

As a consequence:
 - spring-framework-reference HTML documentation is now published
   under reference/html
 - spring-framework-reference/pdf PDF documentation is now published
   under reference/pdf

The following permanent redirect should be created before Spring
Framework 5.3.0 release:
 - current/spring-framework-reference/pdf/* to current/reference/pdf/*
 - current/spring-framework-reference/* to current/reference/html/*

Closes gh-25071
2020-09-12 18:14:36 +02:00
Sam Brannen af3dc5d440 Upgrade to Gradle 6.6.1
See gh-25578
2020-09-11 16:18:47 +02:00
Sam Brannen 45491f0756 Upgrade to Gradle 6.6
Closes gh-25578
2020-08-11 12:10:35 +02:00
Sam Brannen 4ae9895814 Upgrade to Gradle 6.5.1 2020-07-04 15:00:38 +02:00
Sam Brannen 0b163fa536 Upgrade to Gradle 6.5
Closes gh-25180
2020-06-03 14:10:47 +02:00
Sam Brannen 83b564781f Upgrade to Gradle 6.4.1 2020-05-27 13:22:25 +02:00
Brian Clozel 67547e61c6 Add JMH benchmark infrastructure
Prior to this commit, the Spring Framework test suite would rely only on
"Performance" tests associated with a specific CI build. As outlined in
gh-24830, the way they're built and executed is not working well
anymore.

This commit introduces a new JMH benchmark infrastructure in the build.
The goal here is not to run those benchmarks as part of a CI build, but
rather provide a proper infrastructure for writing and locally running
micro-benchmarks when working on specific optimizations.

This commit adds and configures a Gradle JMH plugin to allow for JMH
benchmark classes in Spring Framework modules (in `src/jmh/java` of each
`spring-*` module). It's also relaxing the checkstyle rules for JMH
classes, especially around Javadoc rules: this code is not meant to
have Javadocs.

Finally, this commit links to a new Wiki page on the project GitHub
repository documenting the infrastructure and helping contributors to
run and design benchmarks.

See gh-24830
2020-05-13 21:29:02 +02:00
Sam Brannen b1c1a232ca Upgrade to Gradle 6.4
Closes gh-25020
2020-05-06 14:25:41 +02:00
Sam Brannen 65e8d85142 Only include PNG files in reference manual
The `images` folder contains some files used to create the images, such
as OmniGraffle and SVG.

This commit modifies the `include` pattern to ensure that only `*.png`
files are copied from the source folder to the published reference
manual.
2020-04-29 17:14:11 +02:00
Brian Clozel fdfe58362e Upgrade Gradle plugins 2020-04-29 15:23:14 +02:00
Brian Clozel a20e561897 Upgrade to Gradle Enterprise 3.2
Also use the "io.spring.gradle-enterprise-conventions" plugin for
configuring Gradle Enterprise Cache support.
2020-04-29 10:54:03 +02:00
Brian Clozel f0564b746a Add link to Gradle build scan in Slack notifications
See gh-22490
2020-04-28 17:31:46 +02:00
Brian Clozel b71a7ee26f Upgrade to Gradle 6.3 2020-04-28 15:13:40 +02:00
Jendrik Johannes 9bd60f6554 Update to Gradle 6.2
- Build Scan plugin is now Gradle Enterprise plugin applied in settings
- Compile task dependencies are now defined through classpath
- Test fixture publication can be disabled through public API

Closes gh-24384
2020-04-28 15:03:03 +02:00
Brian Clozel be560d7ad5 Remove artifactory plugin from build
As we're moving the build to Concourse CI, we don't need to use the
Artifactory plugin anymore. Our build will publish the artifacts to a
repository on the local filesystem and will push its content to
Artifactory with the spring-io/artifactory-resource.

This commit also adds the conditional configuration for publishing to a
local repository.

See gh-22490
2020-04-28 14:34:40 +02:00
Sam Brannen 27adbb9a35 Use googlecode syntax highlighting in reference manual
Closes gh-24865
2020-04-28 12:25:24 +02:00
Sam Brannen b69f081a79 Upgrade to spring-doc-resources 0.2.2.RELEASE 2020-04-28 12:20:04 +02:00
Sam Brannen 154fa29471 Upgrade to spring-doc-resources 0.2.1
See gh-24865
2020-04-14 13:36:11 +02:00
Jay Bryant b7eb983107 Update to spring-doc-resources version 0.2.0
This commit updates the spring-doc-resources version to 0.2.0 to get the
latest look and feel in the HTML version of the reference manual.

Closes gh-24831
2020-04-01 14:52:58 +02:00
Sébastien Deleuze 623a019ef8 Upgrade to Dokka 0.10.1
Closes gh-24764
2020-03-23 13:01:06 +01:00
Sam Brannen 7b94112ec6 Update documentation for custom-java-home.gradle
See gh-24719
2020-03-18 17:10:16 +01:00
Sam Brannen e500456f1c Publish distribution zip files again
A change in `docs.gradle` in 5.2.4 resulted in distribution zip files
no longer being published to
https://repo.spring.io/release/org/springframework/spring/.

This commit fixes this by updating the `mavenContent` configuration as
suggested by @wilkinsona.

Closes gh-24605
2020-03-16 15:43:57 +01:00