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 fd8d730
Show file tree
Hide file tree
Showing 2 changed files with 12 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
11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,17 @@ 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 (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_19))
return 19
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17))
return 17
return 11
}

0 comments on commit fd8d730

Please sign in to comment.