Skip to content

Commit f867ff6

Browse files
committed
Set alerting plugin 3.0.0 baseline JDK version to JDK-21
Signed-off-by: Andriy Redko <[email protected]>
1 parent 6239d7b commit f867ff6

7 files changed

+20
-23
lines changed

.github/workflows/bwc-test-workflow.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
needs: Get-CI-Image-Tag
2020
strategy:
2121
matrix:
22-
java: [ 11 ]
22+
java: [ 21 ]
2323
# Job name
2424
name: Build and test Alerting
2525
# This job runs on Linux

.github/workflows/maven-publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
jdk: [17]
16+
jdk: [21]
1717
platform: ["ubuntu-latest"]
1818
if: github.repository == 'opensearch-project/alerting'
1919
runs-on: ${{ matrix.platform }}

.github/workflows/multi-node-test-workflow.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
needs: Get-CI-Image-Tag
2121
strategy:
2222
matrix:
23-
java: [ 11, 17 ]
23+
java: [ 21 ]
2424
# Job name
2525
name: Build and test Alerting
2626
# This job runs on Linux

.github/workflows/security-test-workflow.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
build:
1313
strategy:
1414
matrix:
15-
java: [ 11, 17, 21 ]
15+
java: [ 21 ]
1616
# Job name
1717
name: Build and test Alerting
1818
# This job runs on Linux

.github/workflows/test-workflow.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
WORKING_DIR: ${{ matrix.working_directory }}.
2424
strategy:
2525
matrix:
26-
java: [11, 17, 21]
26+
java: [21]
2727
# Job name
2828
name: Build Alerting with JDK ${{ matrix.java }} on Linux
2929
# This job runs on Linux
@@ -71,7 +71,7 @@ jobs:
7171
WORKING_DIR: ${{ matrix.working_directory }}.
7272
strategy:
7373
matrix:
74-
java: [11, 17, 21]
74+
java: [21]
7575
os: [ windows-latest, macos-latest ]
7676
include:
7777
- os: windows-latest

DEVELOPER_GUIDE.md

+9-14
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
- [Developer Guide](#developer-guide)
22
- [Forking and Cloning](#forking-and-cloning)
33
- [Install Prerequisites](#install-prerequisites)
4-
- [JDK 11](#jdk-11)
5-
- [JDK 14](#jdk-14)
4+
- [JDK 21](#jdk-21)
65
- [Setup](#setup)
76
- [Build](#build)
87
- [Building from the command line](#building-from-the-command-line)
@@ -19,32 +18,28 @@ Fork this repository on GitHub, and clone locally with `git clone`.
1918

2019
### Install Prerequisites
2120

22-
#### JDK 11
21+
#### JDK 21
2322

24-
OpenSearch builds using Java 11 at a minimum, using the Adoptium distribution. 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`. This is configured in [buildSrc/build.gradle](buildSrc/build.gradle) and [distribution/tools/java-version-checker/build.gradle](distribution/tools/java-version-checker/build.gradle).
23+
OpenSearch builds using Java 21 at a minimum, using the Adoptium distribution. 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-11`. This is configured in [buildSrc/build.gradle](buildSrc/build.gradle) and [distribution/tools/java-version-checker/build.gradle](distribution/tools/java-version-checker/build.gradle).
2524

2625
```
2726
allprojects {
28-
targetCompatibility = JavaVersion.VERSION_11
29-
sourceCompatibility = JavaVersion.VERSION_11
27+
targetCompatibility = JavaVersion.VERSION_21
28+
sourceCompatibility = JavaVersion.VERSION_21
3029
}
3130
```
3231

3332
```
34-
sourceCompatibility = JavaVersion.VERSION_11
35-
targetCompatibility = JavaVersion.VERSION_11
33+
sourceCompatibility = JavaVersion.VERSION_21
34+
targetCompatibility = JavaVersion.VERSION_21
3635
```
3736

38-
Download Java 11 from [here](https://adoptium.net/releases.html?variant=openjdk11).
39-
40-
#### JDK 14
41-
42-
To run the full suite of tests, download and install [JDK 14](https://jdk.java.net/archive/) and set `JAVA11_HOME`, and `JAVA14_HOME`. They are required by the [backwards compatibility test](./TESTING.md#testing-backwards-compatibility).
37+
Download Java 21 from [here](https://adoptium.net/releases.html?variant=openjdk21).
4338

4439
### Setup
4540

4641
1. Clone the repository (see [Forking and Cloning](#forking-and-cloning))
47-
2. Make sure `JAVA_HOME` is pointing to a Java 11 JDK (see [Install Prerequisites](#install-prerequisites))
42+
2. Make sure `JAVA_HOME` is pointing to a Java 21 JDK (see [Install Prerequisites](#install-prerequisites))
4843
3. Launch Intellij IDEA, Choose Import Project and select the settings.gradle file in the root of this package.
4944

5045
### Build

build.gradle

+5-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ buildscript {
2323
}
2424
opensearch_no_snapshot = opensearch_version.replace("-SNAPSHOT","")
2525
common_utils_version = System.getProperty("common_utils.version", opensearch_build)
26-
kotlin_version = '1.8.21'
26+
kotlin_version = '1.9.25'
2727
}
2828

2929
repositories {
@@ -87,10 +87,12 @@ allprojects {
8787
apply from: "$rootDir/build-tools/repositories.gradle"
8888

8989
plugins.withId('java') {
90-
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11
90+
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_21
9191
}
9292
plugins.withId('org.jetbrains.kotlin.jvm') {
93-
compileKotlin.kotlinOptions.jvmTarget = compileTestKotlin.kotlinOptions.jvmTarget = JavaVersion.VERSION_11
93+
compileJava.sourceCompatibility = compileTestJava.sourceCompatibility = JavaVersion.VERSION_21
94+
compileJava.targetCompatibility = compileTestJava.targetCompatibility = JavaVersion.VERSION_21
95+
compileKotlin.kotlinOptions.jvmTarget = compileTestKotlin.kotlinOptions.jvmTarget = JavaVersion.VERSION_21
9496
compileKotlin.dependsOn ktlint
9597
}
9698
tasks.withType(AbstractArchiveTask).configureEach {

0 commit comments

Comments
 (0)