Skip to content

Commit 8f6023e

Browse files
committed
Set Java target compatibility to JDK 21
Signed-off-by: Daniel Widdis <[email protected]>
1 parent 13b32f1 commit 8f6023e

File tree

6 files changed

+17
-18
lines changed

6 files changed

+17
-18
lines changed

.github/workflows/CI.yml

+8-12
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17-
# Spotless requires JDK 17+
1817
- uses: actions/setup-java@v4
1918
with:
20-
java-version: 17
19+
java-version: 21
2120
distribution: temurin
2221
- name: Spotless Check
2322
run: ./gradlew spotlessCheck
@@ -26,6 +25,10 @@ jobs:
2625
runs-on: ubuntu-latest
2726
steps:
2827
- uses: actions/checkout@v4
28+
- uses: actions/setup-java@v4
29+
with:
30+
java-version: 21
31+
distribution: temurin
2932
- name: Javadoc CheckStyle
3033
run: ./gradlew checkstyleMain
3134
- name: Javadoc Check
@@ -35,11 +38,7 @@ jobs:
3538
strategy:
3639
matrix:
3740
os: [ubuntu-latest, macos-13, windows-latest]
38-
java: [11, 21]
39-
include:
40-
- os: ubuntu-latest
41-
java: 17
42-
codecov: yes
41+
java: [21,22]
4342
name: Test JDK${{ matrix.java }}, ${{ matrix.os }}
4443
runs-on: ${{ matrix.os }}
4544
steps:
@@ -53,7 +52,7 @@ jobs:
5352
run: |
5453
./gradlew check -x integTest -x yamlRestTest -x spotlessJava
5554
- name: Upload Coverage Report
56-
if: ${{ matrix.codecov }}
55+
if: contains(matrix.os, 'ubuntu') && contains(matrix.java, '21')
5756
uses: codecov/codecov-action@v4
5857
env:
5958
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -65,10 +64,7 @@ jobs:
6564
fail-fast: false
6665
matrix:
6766
os: [ubuntu-latest, macos-13, windows-latest]
68-
java: [11, 21]
69-
include:
70-
- os: ubuntu-latest
71-
java: 17
67+
java: [21]
7268
name: Integ Test JDK${{ matrix.java }}, ${{ matrix.os }}
7369
runs-on: ${{ matrix.os }}
7470
steps:

.github/workflows/test_bwc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
Build-ff-linux:
1212
strategy:
1313
matrix:
14-
java: [11,17,21]
14+
java: [21,22]
1515
fail-fast: false
1616

1717
name: Test Flow Framework BWC

.github/workflows/test_security.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
integ-test-with-security-linux:
1717
strategy:
1818
matrix:
19-
java: [11, 17, 21]
19+
java: [21,22]
2020

2121
name: Run Security Integration Tests on Linux
2222
runs-on: ubuntu-latest

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
88
### Enhancements
99
### Bug Fixes
1010
### Infrastructure
11+
- Set Java target compatibility to JDK 21 ([#730](https://github.com/opensearch-project/flow-framework/pull/730))
12+
1113
### Documentation
1214
### Maintenance
1315
### Refactoring
@@ -17,6 +19,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
1719
### Enhancements
1820
- Add Workflow Step for Reindex from source index to destination ([#718](https://github.com/opensearch-project/flow-framework/pull/718))
1921
- Add param to delete workflow API to clear status even if resources exist ([#719](https://github.com/opensearch-project/flow-framework/pull/719))
22+
2023
### Bug Fixes
2124
- Add user mapping to Workflow State index ([#705](https://github.com/opensearch-project/flow-framework/pull/705))
2225

DEVELOPER_GUIDE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ See [OpenSearch requirements](https://github.com/opensearch-project/OpenSearch/b
2424

2525
#### Java
2626

27-
Flow Framework code currently maintains compatibility with JDK 11. Other plugins may require newer Java versions if used.
27+
The Flow Framework `main` branch targets JDK 21. To ease backporting to `2.x`, maintain compatibility with JDK 11 unless significant benefits can be gained. Other plugins may require newer Java versions if used.
2828

2929
### Setup
3030

3131
1. Clone the repository (see [Forking and Cloning](#forking-and-cloning))
32-
2. Make sure `JAVA_HOME` is pointing to a Java 14 JDK (see [Install Prerequisites](#install-prerequisites))
32+
2. Make sure `JAVA_HOME` is pointing to a Java 21 or higher JDK (see [Install Prerequisites](#install-prerequisites))
3333
3. Launch Intellij IDEA, Choose Import Project and select the settings.gradle file in the root of this package.
3434

3535
### Build

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ allprojects {
149149
}
150150

151151
java {
152-
targetCompatibility = JavaVersion.VERSION_11
153-
sourceCompatibility = JavaVersion.VERSION_11
152+
targetCompatibility = JavaVersion.VERSION_21
153+
sourceCompatibility = JavaVersion.VERSION_21
154154
}
155155

156156
repositories {

0 commit comments

Comments
 (0)