Enforce that JDK <= 17 is used for building (#2551)

Using JDK 21 currently causes multiple issues, some of which are not easy
to fix at the moment (such as target version 7 not being supported anymore).
This commit is contained in:
Marcono1234 2023-11-27 01:34:26 +01:00 committed by GitHub
parent 3b1b361be1
commit 6f1a18af52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -83,7 +83,7 @@ Gson uses Maven to build the project:
mvn clean verify
```
JDK 11 or newer is required for building, JDK 17 is recommended.
JDK 11 or newer is required for building, JDK 17 is recommended. Newer JDKs are currently not supported for building (but are supported when _using_ Gson).
### Contributing

View File

@ -120,7 +120,9 @@
<!-- Enforce that correct JDK version is used to avoid cryptic build errors -->
<requireJavaVersion>
<!-- Other plugins of this build require at least JDK 11 -->
<version>[11,)</version>
<!-- Fail fast when building with JDK > 17 because it causes build failures,
see https://github.com/google/gson/issues/2501 -->
<version>[11,18)</version>
</requireJavaVersion>
</rules>
</configuration>