From 91bda162af4fe1bf02c60ac7f64d562dfbe2b173 Mon Sep 17 00:00:00 2001
From: Andrew Ross <andrross@amazon.com>
Date: Thu, 6 Jun 2024 16:07:01 +0000
Subject: [PATCH] Set JDK21 as the baseline for the 3.0 major version

Signed-off-by: Andrew Ross <andrross@amazon.com>
---
 .github/workflows/check.yml                   | 4 ++--
 .github/workflows/ci.yml                      | 4 ++--
 .github/workflows/publish-maven-snapshots.yml | 2 +-
 build.gradle                                  | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index 6f72111..bd3817f 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -11,7 +11,7 @@ jobs:
     needs: Get-CI-Image-Tag
     strategy:
       matrix:
-        java: [ 11, 17, 21 ]
+        java: [ 21 ]
     if: github.repository == 'opensearch-project/custom-codecs'
     runs-on: ubuntu-latest
     container:
@@ -38,7 +38,7 @@ jobs:
     if: github.repository == 'opensearch-project/custom-codecs'
     strategy:
       matrix:
-        java: [ 11, 17, 21 ]
+        java: [ 21 ]
         os: [windows-latest, macos-13]
     runs-on: ${{ matrix.os }}
     steps:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2611fe8..5393586 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -19,7 +19,7 @@ jobs:
       - uses: actions/setup-java@v4
         with:
           distribution: temurin # Temurin is a distribution of adoptium
-          java-version: 17
+          java-version: 21
 
       - name: Checkout custom-codecs Repo
         uses: actions/checkout@v4
@@ -35,7 +35,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        jdk: [11, 17]
+        jdk: [21]
         platform: [ubuntu-latest, windows-latest]
     runs-on: ${{ matrix.platform }}
 
diff --git a/.github/workflows/publish-maven-snapshots.yml b/.github/workflows/publish-maven-snapshots.yml
index b1374b0..6e5db19 100644
--- a/.github/workflows/publish-maven-snapshots.yml
+++ b/.github/workflows/publish-maven-snapshots.yml
@@ -20,7 +20,7 @@ jobs:
       - uses: actions/setup-java@v3
         with:
           distribution: temurin
-          java-version: 11
+          java-version: 21
       - uses: actions/checkout@v3
       - uses: aws-actions/configure-aws-credentials@v1
         with:
diff --git a/build.gradle b/build.gradle
index e0d842f..00a6f89 100644
--- a/build.gradle
+++ b/build.gradle
@@ -78,8 +78,8 @@ allprojects {
   }
 
   java {
-      targetCompatibility = JavaVersion.VERSION_11
-      sourceCompatibility = JavaVersion.VERSION_11
+      targetCompatibility = JavaVersion.VERSION_21
+      sourceCompatibility = JavaVersion.VERSION_21
   }
 }