Skip to content

Commit b018a64

Browse files
committed
Set baseline JDK version to JDK-21
Signed-off-by: Daniel Widdis <[email protected]>
1 parent 4fad0de commit b018a64

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- uses: actions/checkout@v4
30-
- name: Set up JDK 11
30+
- name: Set up JDK 21
3131
uses: actions/setup-java@v4
3232
with:
33-
java-version: 11
33+
java-version: 21
3434
distribution: temurin
3535
- name: Run Gradle Check
3636
run: |

.github/workflows/publish-snapshots.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v4
19-
- name: Set up JDK 11
19+
- name: Set up JDK 21
2020
uses: actions/setup-java@v4
2121
with:
22-
java-version: 11
22+
java-version: 21
2323
distribution: temurin
2424
- name: Configure AWS credentials
2525
uses: aws-actions/configure-aws-credentials@v4

build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ dependencies {
178178
def guavaFailureAccessVersion = "1.0.2"
179179
def aopallianceVersion = "1.0"
180180
def slf4jVersion = "1.7.36"
181+
def commonsLoggingVersion = "1.2"
181182

182183
api("org.opensearch:opensearch:${opensearchVersion}")
183184
implementation("org.apache.logging.log4j:log4j-api:${log4jVersion}")
@@ -231,10 +232,16 @@ dependencies {
231232
force("org.apache.logging.log4j:log4j-core:${log4jVersion}")
232233
force("org.apache.logging.log4j:log4j-jul:${log4jVersion}")
233234
force("org.slf4j:slf4j-api:${slf4jVersion}")
235+
force("commons-logging:commons-logging:${commonsLoggingVersion}")
234236
}
235237
}
236238
}
237239

240+
// Compile SDK 2.x for JDK 21
241+
tasks.withType(JavaCompile) {
242+
options.release.set(21)
243+
}
244+
238245
// this task runs the helloworld sample extension
239246
task helloWorld(type: JavaExec) {
240247
group = 'Execution'

0 commit comments

Comments
 (0)