From 750145ce674d99caad1a5258fed8e0c48ce52cfd Mon Sep 17 00:00:00 2001 From: Vaibhav Chopra Date: Sun, 10 May 2026 20:51:15 +0530 Subject: [PATCH] chore: upgrade Java 11+ and dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Java: 1.8 → 11 - okhttp: 3.10.0 → 4.12.0 - org.json: 20231013 → 20240303 - commons-codec: 1.11 → 1.17.1 - commons-text: 1.3 → 1.12.0 (fixes CVE-2022-42889) - mockito-inline: 2.13.0 → 5.2.0 - CI: test Java 11, 17, 21 - GitHub Actions: v2 → v4 Co-Authored-By: Claude Opus 4.7 --- .github/workflows/ci.yml | 39 +++++++++++++++++++++------------------ pom.xml | 16 ++++++++-------- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23d629f3..797ddafa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,52 +8,55 @@ on: pull_request: branches: - master -# Jobs jobs: test: - name: Run tests and publish test coverage + name: Test on Java ${{ matrix.java-version }} runs-on: ubuntu-latest + strategy: + matrix: + java-version: [11, 17, 21] steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - name: Set up Java JDK - uses: actions/setup-java@v2 + - name: Set up Java JDK ${{ matrix.java-version }} + uses: actions/setup-java@v4 with: - java-version: 8 - distribution: 'adopt' - + java-version: ${{ matrix.java-version }} + distribution: 'temurin' + - name: Install dependencies run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -Dgpg.skip - + - name: Run tests and collect coverage - run: mvn -B test + run: mvn -B test - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + if: matrix.java-version == 21 + uses: codecov/codecov-action@v4 with: fail_ci_if_error: false verbose: true - + publish: if: startsWith(github.ref, 'refs/tags/v') needs: test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Maven Central Repository - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - java-version: 8 - distribution: 'adopt' + java-version: 11 + distribution: 'temurin' server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} - + - name: Build with Maven run: mvn clean package -B - + - name: Publish package run: | mvn deploy -Dgpg.passphrase=${{ secrets.MAVEN_GPG_PASSPHRASE }} diff --git a/pom.xml b/pom.xml index 61d95118..f9375a4a 100644 --- a/pom.xml +++ b/pom.xml @@ -36,8 +36,8 @@ UTF-8 - 1.8 - 1.8 + 11 + 11 @@ -54,7 +54,7 @@ org.mockito mockito-inline - 2.13.0 + 5.2.0 test @@ -68,31 +68,31 @@ com.squareup.okhttp3 okhttp - 3.10.0 + 4.12.0 com.squareup.okhttp3 logging-interceptor - 3.10.0 + 4.12.0 org.json json - 20231013 + 20240303 commons-codec commons-codec - 1.11 + 1.17.1 org.apache.commons commons-text - 1.3 + 1.12.0