Skip to content

Commit

Permalink
CI: Enable jdk21 builds
Browse files Browse the repository at this point in the history
Modifications:
- Update mockito 4.11.0 -> 5.5.0 (only for jdk11+)
- Disable spotbugs on JDK21 or greater due to incompatibility
spotbugs/spotbugs#2567
  • Loading branch information
Scottmitch committed Sep 20, 2023
1 parent 33d1a01 commit 396ed60
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-prb-reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
# Matrix should be coordinated with ci-prb.yml.
matrix:
java: [ 8, 11, 17, 20 ]
java: [ 8, 11, 17, 21 ]
os: [ ubuntu-latest ]
steps:
- name: Download Artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-prb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ 8, 11, 17, 20 ]
java: [ 8, 11, 17, 21 ]
os: [ ubuntu-latest ]
steps:
- name: Checkout Code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-prq-reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17, 20 ]
java: [ 8, 11, 17, 21 ]
steps:
- name: Download Artifacts
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-prq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17, 20 ]
java: [ 8, 11, 17, 21 ]
steps:
- name: Checkout Code
uses: actions/checkout@v4
Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ task validateLocalDocSite(type: Exec) {
quality.dependsOn validateLocalDocSite

subprojects {
// mockito 5 only supports jdk11+
if (JavaVersion.current() < JavaVersion.VERSION_11) {
project.setProperty("mockitoCoreVersion", "4.11.0")
}
// Used by ci-release.yaml to determine which modules need to be built/released with JDK11.
task printJavaTargetCompatibility {
doLast {
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ junit5Version=5.9.3
testngVersion=7.5
assertJCoreVersion=3.24.2
hamcrestVersion=2.2
mockitoCoreVersion=4.11.0
# mockito version is overridden for <jdk11 in build.gradle
mockitoCoreVersion=5.5.0
spotbugsPluginVersion=5.0.13

apacheDirectoryServerVersion=1.5.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ final class ServiceTalkLibraryPlugin extends ServiceTalkCorePlugin {
xml.enabled = project.ext.isCiBuild
html.enabled = !project.ext.isCiBuild
}
// https://github.com/spotbugs/spotbugs/issues/2567
enabled = JavaVersion.current() < JavaVersion.VERSION_21
}

tasks.withType(SpotBugsTask).all {
Expand Down

0 comments on commit 396ed60

Please sign in to comment.