This is an automated email from the ASF dual-hosted git repository. benw pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
commit 834dccda1a80dcd0abc42d17a1a0925c9abaad49 Author: Ben Weidig <[email protected]> AuthorDate: Sun Jan 25 12:14:51 2026 +0100 TAP5-2809: Setting java toolchain/release to 11, remove version safeguards --- build.gradle | 8 +++----- buildSrc/src/main/groovy/tapestry.java-convention.gradle | 9 +++++++-- settings.gradle | 5 +---- tapestry-core/build.gradle | 4 +--- tapestry-javadoc/build.gradle | 11 ++++------- 5 files changed, 16 insertions(+), 21 deletions(-) diff --git a/build.gradle b/build.gradle index 5ace0cef1..dbd8b2958 100755 --- a/build.gradle +++ b/build.gradle @@ -79,11 +79,9 @@ configurations { } dependencies { - if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) { - javadoc project(':tapestry-javadoc') - meta providers.provider { - tasks.named('aggregateJavadoc').get().outputs.files - } + javadoc project(':tapestry-javadoc') + meta providers.provider { + tasks.named('aggregateJavadoc').get().outputs.files } // From tapestry-ioc: diff --git a/buildSrc/src/main/groovy/tapestry.java-convention.gradle b/buildSrc/src/main/groovy/tapestry.java-convention.gradle index d06cbb6ca..c12ccee44 100644 --- a/buildSrc/src/main/groovy/tapestry.java-convention.gradle +++ b/buildSrc/src/main/groovy/tapestry.java-convention.gradle @@ -6,12 +6,17 @@ plugins { } java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + toolchain { + languageVersion = JavaLanguageVersion.of(11) + } withSourcesJar() } +tasks.withType(JavaCompile).configureEach { + options.release = 11 +} + configurations { provided meta diff --git a/settings.gradle b/settings.gradle index 5f4f20356..e043b4671 100644 --- a/settings.gradle +++ b/settings.gradle @@ -31,6 +31,7 @@ include('plastic', 'tapestry-core', 'tapestry-hibernate-core', 'tapestry-hibernate', + 'tapestry-javadoc', 'tapestry-jmx', 'tapestry-upload', 'tapestry-beanvalidator', @@ -54,10 +55,6 @@ include('plastic', 'tapestry-openapi-viewer', 'tapestry-rest-jackson') -if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) { - include('tapestry-javadoc') -} - if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) { include('tapestry-latest-java-tests', 'tapestry-spring') } diff --git a/tapestry-core/build.gradle b/tapestry-core/build.gradle index fa3655862..0940740f5 100644 --- a/tapestry-core/build.gradle +++ b/tapestry-core/build.gradle @@ -112,9 +112,7 @@ tasks.named('compileTestGroovy') { test { // Needed to have XMLTokenStreamTests.testStreamEncoding() passing on Java 9+ - if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_1_9)) { - jvmArgs('--add-opens=java.base/java.nio.charset=ALL-UNNAMED') - } + jvmArgs('--add-opens=java.base/java.nio.charset=ALL-UNNAMED') // TAP5-2722 systemProperty 'user.language', 'en' diff --git a/tapestry-javadoc/build.gradle b/tapestry-javadoc/build.gradle index 59bd8a2b7..81baba6b0 100644 --- a/tapestry-javadoc/build.gradle +++ b/tapestry-javadoc/build.gradle @@ -25,11 +25,8 @@ tasks.withType(JavaCompile).configureEach { sourceCompatibility = '11' targetCompatibility = '11' - // Only apply --add-modules if target is not 1.8 - if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) { - options.compilerArgs += [ - '--add-modules', - 'jdk.compiler' - ] - } + options.compilerArgs += [ + '--add-modules', + 'jdk.compiler' + ] }
