Commit Graph

200 Commits

Author SHA1 Message Date
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
Sam Brannen d481b81b7e Fix copy-n-paste error in custom_java_home.gradle script
See gh-24474
2020-02-12 23:08:42 +01:00
Andy Wilkinson d0d8c6e749
Use Gradle Enterprise Conventions Plugin to configure build scans
Closes gh-24512
2020-02-12 18:14:33 +01:00
Sam Brannen de7bed2ab2 Simplify custom_java_home.gradle script
Setting `options.fork = true` causes the classpath in the forked
compiler process to include Class-Path entries from MANIFEST.MF files
in JARs in the classpath, which results in warnings about missing
classpath entries.

This commit removes the `options.fork = true` declaration and further
simplifies the script.

See gh-24474
2020-02-12 14:30:29 +01:00
Andy Wilkinson 02e90a8645
Upgrade to Spring Asciidoctor Extensions 0.4.0.RELEASE
0.4.0 provides built-in support for remembering a user's selections
using local storage. This replaces the custom switch language
JavaScript.

The selection is stored using a key derived from the
options that were available. Concretely, when the options are Java or
Kotlin, the local storage key is java-kotlin. Similarly, if the
choices were Java, Kotlin, and XML, the key would be java-kotlin-xml.

Given local storage's domain and protocol scoping, the nature of the
key that's used for storage will allow a user's selections to be
applied across all documentation hosted on https://docs.spring.io that
offer the same options.

Closes gh-24481
2020-02-07 12:16:02 +01:00
Sam Brannen c648425822 Ignore warnings for missing classpath elements with custom JAVA_HOME
Prior to this commit, the "-Werror" was removed as a command-line
argument in order not to fail the build for missing classpath elements.

This commit reinstates "-Werror" and removes "-Xlink:path" in order to
explicitly ignore warnings for missing classpath elements when executing
the build with a custom JAVA_HOME.

See gh-24474
2020-02-07 10:23:07 +01:00
Sam Brannen ce2c0e4c79 Credit @marcphilipp and @snicoll
See gh-24474
2020-02-06 15:32:51 +01:00
Sam Brannen 8f02e1088d Support alternate JDK versions in Gradle build
This commit adds support for the following two JVM system properties
that control the Gradle build for alternative JDKs (i.e., a JDK other
than the one used to launch the Gradle process).

- customJavaHome: absolute path to the alternate JDK installation to
  use to compile Java code and execute tests. Setting this system
  property causes Groovy 3.0 RC3 to be used instead of 2.5.x. This
  system property is also used in spring-oxm.gradle to determine
  whether JiBX is supported.

- customJavaSourceVersion: Java version supplied to the `--release`
  command line flag to control the Java source and target compatibility
  version. Supported versions include 9 or higher. Do not set this
  system property if Java 8 should be used.

Examples:

./gradlew -DcustomJavaHome=/opt/java/jdk-14 test

./gradlew --no-build-cache -DcustomJavaHome=/opt/java/jdk-14 test

./gradlew -DcustomJavaHome=/opt/java/jdk-14 -DcustomJavaSourceVersion=14 test

See gh-24474
2020-02-06 15:24:19 +01:00
Rob Winch e66e41029c Asciidoctor Warnings Are Fatal
Ensure we don't get any more warnings within Asciidoctor build

Issue gh-24427
2020-01-24 15:51:59 -06:00
Andy Wilkinson 1ec15ba9c2 Always configure PDF backend as task will only run on cache miss
Previously, the Asciidoctor task was not cacheable and generating the
PDF documentation was very slow. To improve build times, the PDF
documentation was not generated for snapshot builds.

The upgrade to 2.4.0 of the Asciidoctor Gradle pluging means that the
Asciidoctor task is now cacheable. As such, its tasks will only run
when the documentation has changed. This should allow PDF
documentation to be published for every build without slowing things
down too much and the cost of generating the documentation will only
be incurred when there is a change to the documentation.

See gh-24216
2020-01-09 10:17:44 +01:00
Andy Wilkinson 2ac5744323 Upgrade to Asciidoctor Gradle Plugin 2.4
This commit updates the build to use the latest version of the
Asciidoctor Gradle Plugin. One significant new feature is that the
plugin's tasks are now cacheable.

Closes gh-24216
2020-01-09 10:17:27 +01:00
Sam Brannen 22a888b53d Polish test fixture publication skipping config
Thanks to @jjohannes for the tip.

See gh-23550
2020-01-03 14:56:13 +01:00
Sam Brannen d5f0bb23ae Disable publication of test fixture artifacts
Thanks to @melix for providing the code snippet necessary to achieve
this with Gradle 5.6.x.

See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen c91dd02905 Delete obsolete TestSourcesPlugin
Since we have migrated to Gradle's built-in test fixture support, the
custom TestSourcesPlugin Gradle plugin is now obsolete.

See gh-23550
2020-01-02 16:01:35 +01:00
Andy Wilkinson 7f61f3852c Enable reading from the remote build cache for all
Previously, the remote build cache was only enabled if the
GRADLE_ENTERPRISE_URL environment variable was configured. This meant
that contributors would not benefit from the build time improvements
of the caching without some additional setup.

This commit updates the buildCache configuration so that reading from
the remote build cache at https://ge.spring.io is enabled for all.
Pushing to the cache continues to be disabled unless the required
credentials are provided. Build scan configuration has also been
updated in line with this change. While the server URL is now
hardcoded, publishing is still opt-in via an environment variable.
The exact mechanism by which someone can opt in will change in the
future once some server-side changes have been made. At this point,
only a change to publishAlwaysIf should be necessary.

Closes gh-24105
2019-11-29 17:58:09 +01:00
YuDongYing 4e5ae54417 Fix schemaZip Gradle task on MS Windows
Prior to this commit, the schemaZip Gradle task failed to find Spring
schema files on MS Windows due to path separators hard coded to forward
slashes that are not compatible with the Windows operating system.

Consequently, a full build failed on Windows since the distZip task was
not able to locate the zipped schema archive that the schemaZip task
failed to create.

This commit fixes this by updating the schemaZip task to search for
schema files using backslashes as well as forward slashes.

Closes gh-23933
2019-11-13 14:49:25 +01:00
Sam Brannen f746e9df82 Upgrade to Gradle 5.6.4 2019-11-03 15:04:58 +01:00
Andy Wilkinson 1a54b83ae1 Add opt-in support for remote build cache and pushing to it from CI
This commit provides opt-in enablement of Gradle's remote build
cache. When the GRADLE_ENTERPRISE_URL environment variable is set, its
build cache node will be used as a source of cached output. If both
GRADLE_ENTERPRISE_CACHE_USERNAME and GRADLE_ENTERPRISE_CACHE_PASSWORD
are also set, task output produced by the build will be pushed to the
build cache node for use by subsequent builds.

Closes gh-23883
2019-10-29 12:46:33 +01:00
Sam Brannen fd95646a04 Polish contribution
See gh-23869
2019-10-25 15:26:20 +02:00
Johnny Lim 46a31bc656 Extract build cache settings to a dedicated file
Closes gh-23869
2019-10-25 15:08:11 +02:00
Andy Wilkinson cba91ab28e Stop Created-By manifest header from causing a test task cache miss
Previously, when a project's jar was an input into a test task, a
cache hit required the current build to be using the same JDK as the
one that created the cache entry. This was due to the Created-By
entry in the jar's manifest which will vary if JDKs with different
values for the java.version and java.specification.vendor version are
used.

This commit configures normalization of the runtime classpath to ignore
META-INF/MANIFEST.MF, thereby allowing a cache hit when the tests were
previously run on a different JDK than the one being used now. Typically
this is a different update release being used on a CI agent and a
developer's machine. This change will therefore improve the likelihood
of a cache hit once remote caching has been enabled.

Closes gh-23872
2019-10-25 13:52:48 +02:00
Sam Brannen 243f2890ee Upgrade to Gradle 5.6.3 2019-10-18 11:59:30 +02:00