From 396ed604f2248920ff8dbba6eca1e41f0d8f07fc Mon Sep 17 00:00:00 2001 From: Scott Mitchell Date: Wed, 20 Sep 2023 08:08:05 -0700 Subject: [PATCH] CI: Enable jdk21 builds Modifications: - Update mockito 4.11.0 -> 5.5.0 (only for jdk11+) - Disable spotbugs on JDK21 or greater due to incompatibility https://github.com/spotbugs/spotbugs/issues/2567 --- .github/workflows/ci-prb-reports.yml | 2 +- .github/workflows/ci-prb.yml | 2 +- .github/workflows/ci-prq-reports.yml | 2 +- .github/workflows/ci-prq.yml | 2 +- build.gradle | 4 ++++ gradle.properties | 3 ++- .../gradle/plugin/internal/ServiceTalkLibraryPlugin.groovy | 2 ++ 7 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-prb-reports.yml b/.github/workflows/ci-prb-reports.yml index 2fabe824d2..9d6627c22e 100644 --- a/.github/workflows/ci-prb-reports.yml +++ b/.github/workflows/ci-prb-reports.yml @@ -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 diff --git a/.github/workflows/ci-prb.yml b/.github/workflows/ci-prb.yml index 4e0dcaea38..4b6a28945f 100644 --- a/.github/workflows/ci-prb.yml +++ b/.github/workflows/ci-prb.yml @@ -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 diff --git a/.github/workflows/ci-prq-reports.yml b/.github/workflows/ci-prq-reports.yml index a7892ea028..ebc62762b4 100644 --- a/.github/workflows/ci-prq-reports.yml +++ b/.github/workflows/ci-prq-reports.yml @@ -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 diff --git a/.github/workflows/ci-prq.yml b/.github/workflows/ci-prq.yml index c0476daef2..a51a3841a3 100644 --- a/.github/workflows/ci-prq.yml +++ b/.github/workflows/ci-prq.yml @@ -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 diff --git a/build.gradle b/build.gradle index 42f13ac947..0b4b1f1b84 100644 --- a/build.gradle +++ b/build.gradle @@ -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 { diff --git a/gradle.properties b/gradle.properties index 9da306e891..c05ae6a1ec 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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