From 59d4d28f591daf5c3a14e4250faa10f34d064048 Mon Sep 17 00:00:00 2001 From: Kshitij Tandon Date: Thu, 24 Oct 2024 17:26:17 +0530 Subject: [PATCH] Updating baseline JDK version to JDK-21 Signed-off-by: Kshitij Tandon --- .github/workflows/maven-publish.yml | 2 +- .github/workflows/multi-node-test-workflow.yml | 2 +- .github/workflows/test-and-build-workflow.yml | 4 ++-- DEVELOPER_GUIDE.md | 10 +++++----- build.gradle | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 5e947b345..0cb12857a 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/setup-java@v3 with: distribution: temurin # Temurin is a distribution of adoptium - java-version: 11 + java-version: 21 - uses: actions/checkout@v3 - uses: aws-actions/configure-aws-credentials@v1 with: diff --git a/.github/workflows/multi-node-test-workflow.yml b/.github/workflows/multi-node-test-workflow.yml index e3c1bb911..40d9cc905 100644 --- a/.github/workflows/multi-node-test-workflow.yml +++ b/.github/workflows/multi-node-test-workflow.yml @@ -44,7 +44,7 @@ jobs: uses: actions/setup-java@v2 with: distribution: temurin # Temurin is a distribution of adoptium - java-version: 17 + java-version: 21 # index-management - name: Checkout Branch uses: actions/checkout@v2 diff --git a/.github/workflows/test-and-build-workflow.yml b/.github/workflows/test-and-build-workflow.yml index a5dc4c0cb..5713aea5e 100644 --- a/.github/workflows/test-and-build-workflow.yml +++ b/.github/workflows/test-and-build-workflow.yml @@ -24,7 +24,7 @@ jobs: fail-fast: false # This starts three jobs, setting these environment variables uniquely for the different jobs matrix: - java: [11, 17, 21] + java: [21] feature: [ism, non-ism] include: - feature: ism @@ -88,7 +88,7 @@ jobs: fail-fast: false # This starts three jobs, setting these environment variables uniquely for the different jobs matrix: - java: [11, 17, 21] + java: [21] os: [windows-latest, macos-latest] feature: [ism, non-ism] include: diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index c37625806..690727245 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -1,7 +1,7 @@ - [Developer Guide](#developer-guide) - [Forking and Cloning](#forking-and-cloning) - [Install Prerequisites](#install-prerequisites) - - [JDK 11](#jdk-11) + - [JDK 21](#jdk-21) - [Setup](#setup) - [Build](#build) - [Building from the command line](#building-from-the-command-line) @@ -19,17 +19,17 @@ Fork this repository on GitHub, and clone locally with `git clone`. ### Install Prerequisites -#### JDK 11 +#### JDK 21 -OpenSearch components build using Java 11 at a minimum. This means you must have a JDK 11 installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK 11 installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-11`. +OpenSearch components build using Java 21 at a minimum. This means you must have a JDK 21 installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK 21 installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-21`. -Download Java 11 from [here](https://adoptium.net/releases.html?variant=openjdk11). +Download Java 21 from [here](https://adoptium.net/releases.html?variant=openjdk21). ## Setup 1. Check out this package from version control. 2. Launch Intellij IDEA, choose **Import Project**, and select the `settings.gradle` file in the root of this package. -3. To build from the command line, set `JAVA_HOME` to point to a JDK >= 11 before running `./gradlew`. +3. To build from the command line, set `JAVA_HOME` to point to a JDK >= 21 before running `./gradlew`. - Unix System 1. `export JAVA_HOME=jdk-install-dir`: Replace `jdk-install-dir` with the JAVA_HOME directory of your system. 2. `export PATH=$JAVA_HOME/bin:$PATH` diff --git a/build.gradle b/build.gradle index d3d344700..7fc33498b 100644 --- a/build.gradle +++ b/build.gradle @@ -274,11 +274,11 @@ publishing { tasks.generatePomFileForPluginZipPublication.dependsOn publishNebulaPublicationToMavenLocal plugins.withId('java') { - sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = targetCompatibility = JavaVersion.VERSION_21 } plugins.withId('org.jetbrains.kotlin.jvm') { - compileKotlin.kotlinOptions.jvmTarget = compileTestKotlin.kotlinOptions.jvmTarget = JavaVersion.VERSION_11 + compileKotlin.kotlinOptions.jvmTarget = compileTestKotlin.kotlinOptions.jvmTarget = JavaVersion.VERSION_21 compileKotlin.dependsOn ktlint }