Skip to content

Commit

Permalink
Enable Java 19 for Windows in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsromero committed Mar 22, 2023
1 parent a988b81 commit 4a64e3a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 12 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 4a64e3a

Please sign in to comment.