diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 34634b4ee..c0dac1bb8 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -43,11 +43,12 @@ jobs: runs-on: windows-latest strategy: fail-fast: false - max-parallel: 2 + max-parallel: 3 matrix: java: - '11' - '17' + - '19' steps: - uses: actions/checkout@v3 with: diff --git a/build.gradle b/build.gradle index a847f294a..b3e91e23b 100644 --- a/build.gradle +++ b/build.gradle @@ -199,8 +199,19 @@ configure(subprojects.findAll { !it.name.endsWith('-distribution') && ! it.name. withJavadocJar() withSourcesJar() toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(getToolchainVersion())) } } } + +// Windows workaround to fix invalid toolchain detection +def getToolchainVersion() { + if (OperatingSystem.isWindows()) { + if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_19)) + return 19 + if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) + return 17 + } + return 11 +}