Revisit compiler configuration in project build

This commit revisit the build configuration to enforce the following:

* A single Java toolchain is used consistently with a recent Java
  version (here, Java 23) and language level
* the main source is compiled with the Java 17 "-release" target
* Multi-Release classes are compiled with their respective "-release"
  target. For now, only "spring-core" ships Java 21 variants.

Closes gh-34507
This commit is contained in:
Brian Clozel
2025-02-25 11:03:42 +01:00
parent 382caac37c
commit 68e9460e9b
13 changed files with 420 additions and 127 deletions

View File

@@ -2,7 +2,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.springframework.build.shadow.ShadowSource
plugins {
id 'me.champeau.mrjar'
id 'org.springframework.build.multiReleaseJar'
}
description = "Spring Core"
@@ -11,7 +11,7 @@ apply plugin: "kotlin"
apply plugin: "kotlinx-serialization"
multiRelease {
targetVersions 17, 21
releaseVersions 21
}
def javapoetVersion = "1.13.0"