Commit Graph

11 Commits

Author SHA1 Message Date
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
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 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
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