From 1c6a3730f5f2e3fd73f2ffbee5ca977502564d68 Mon Sep 17 00:00:00 2001 From: Daniel Widdis Date: Mon, 10 Jun 2024 06:20:43 -0700 Subject: [PATCH] Set baseline JDK version to JDK-21 (#999) Signed-off-by: Daniel Widdis --- .github/workflows/build.yml | 4 ++-- .github/workflows/publish-snapshots.yml | 4 ++-- build.gradle | 7 +++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index be4567d2..b4a65256 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,10 +27,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up JDK 11 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 21 distribution: temurin - name: Run Gradle Check run: | diff --git a/.github/workflows/publish-snapshots.yml b/.github/workflows/publish-snapshots.yml index 39d7502f..dc0ad97b 100644 --- a/.github/workflows/publish-snapshots.yml +++ b/.github/workflows/publish-snapshots.yml @@ -16,10 +16,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Set up JDK 11 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 21 distribution: temurin - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 diff --git a/build.gradle b/build.gradle index e9c7ac9c..71e3a88b 100644 --- a/build.gradle +++ b/build.gradle @@ -178,6 +178,7 @@ dependencies { def guavaFailureAccessVersion = "1.0.2" def aopallianceVersion = "1.0" def slf4jVersion = "1.7.36" + def commonsLoggingVersion = "1.2" api("org.opensearch:opensearch:${opensearchVersion}") implementation("org.apache.logging.log4j:log4j-api:${log4jVersion}") @@ -231,10 +232,16 @@ dependencies { force("org.apache.logging.log4j:log4j-core:${log4jVersion}") force("org.apache.logging.log4j:log4j-jul:${log4jVersion}") force("org.slf4j:slf4j-api:${slf4jVersion}") + force("commons-logging:commons-logging:${commonsLoggingVersion}") } } } +// Compile SDK 2.x for JDK 21 +tasks.withType(JavaCompile) { + options.release.set(21) +} + // this task runs the helloworld sample extension task helloWorld(type: JavaExec) { group = 'Execution'