Emmanuel Bourg pushed to branch master at Debian Java Maintainers / gradle
Commits: 75784913 by Emmanuel Bourg at 2023-09-25T07:58:37+02:00 Adjust the source/target level to 8 for OpenJDK 21 (Closes: #1052482) - - - - - 2 changed files: - debian/changelog - debian/patches/auto-adjust-language-level.patch Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,11 @@ +gradle (4.4.1-19) UNRELEASED; urgency=medium + + * Team upload. + * Raise automatically the javac source/target level to at least 8 + to build Gradle based packages with OpenJDK 21 (Closes: #1052482) + + -- Emmanuel Bourg <ebo...@apache.org> Mon, 25 Sep 2023 00:53:18 +0200 + gradle (4.4.1-18) unstable; urgency=medium * Team upload. ===================================== debian/patches/auto-adjust-language-level.patch ===================================== @@ -7,7 +7,7 @@ Forwarded: not-needed private String sourceCompatibility; private String targetCompatibility; -+ private List<String> unsupportedLanguageLevels = java.util.Arrays.asList(new String[]{"1.1", "1.2", "1.3", "1.4", "1.5", "5", "1.6", "6"}); ++ private List<String> unsupportedLanguageLevels = java.util.Arrays.asList(new String[]{"1.1", "1.2", "1.3", "1.4", "1.5", "5", "1.6", "6", "1.7", "7"}); + + /** Detect if a Debian build is in process */ + static boolean isDebianBuild() { @@ -22,8 +22,8 @@ Forwarded: not-needed @Override public void setSourceCompatibility(String sourceCompatibility) { + if (isDebianBuild() && unsupportedLanguageLevels.contains(sourceCompatibility)) { -+ System.err.println( "Use of source " + sourceCompatibility + " is no longer supported, switching to 7" ); -+ sourceCompatibility = "7"; ++ System.err.println( "Use of source " + sourceCompatibility + " is no longer supported, switching to 8" ); ++ sourceCompatibility = "8"; + } + this.sourceCompatibility = sourceCompatibility; @@ -34,8 +34,8 @@ Forwarded: not-needed @Override public void setTargetCompatibility(String targetCompatibility) { + if (isDebianBuild() && unsupportedLanguageLevels.contains(targetCompatibility)) { -+ System.err.println( "Use of target " + targetCompatibility + " is no longer supported, switching to 7" ); -+ targetCompatibility = "7"; ++ System.err.println( "Use of target " + targetCompatibility + " is no longer supported, switching to 8" ); ++ targetCompatibility = "8"; + } + this.targetCompatibility = targetCompatibility; View it on GitLab: https://salsa.debian.org/java-team/gradle/-/commit/75784913ca9f47a2a830c77834c44e24d709f72e -- View it on GitLab: https://salsa.debian.org/java-team/gradle/-/commit/75784913ca9f47a2a830c77834c44e24d709f72e You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ pkg-java-commits mailing list pkg-java-comm...@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-java-commits