Skip to content

Commit a546251

Browse files
authored
Set notifications plugin 3.0.0 baseline JDK version to JDK-21 (#973)
* Set notifications plugin 3.0.0 baseline JDK version to JDK-21 Signed-off-by: Andriy Redko <andriy.redko@aiven.io> * Review code review comments Signed-off-by: Andriy Redko <andriy.redko@aiven.io> --------- Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
1 parent b04dc08 commit a546251

5 files changed

+26
-8
lines changed

.github/workflows/maven-publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions/setup-java@v3
2424
with:
2525
distribution: temurin # Temurin is a distribution of adoptium
26-
java-version: 17
26+
java-version: 21
2727
- uses: actions/checkout@v3
2828
- uses: aws-actions/configure-aws-credentials@v1
2929
with:

.github/workflows/notifications-test-and-build-workflow.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
# This setting says that all jobs should finish, even if one fails
2323
fail-fast: false
2424
matrix:
25-
java: [11, 17, 21]
25+
java: [21]
2626

2727
# Job name
2828
name: Build Notifications with JDK ${{ matrix.java }} on linux
@@ -85,7 +85,7 @@ jobs:
8585
# This setting says that all jobs should finish, even if one fails
8686
fail-fast: false
8787
matrix:
88-
java: [11, 17, 21]
88+
java: [21]
8989
os: [ windows-latest, macos-latest ]
9090
include:
9191
- os: windows-latest

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# This setting says that all jobs should finish, even if one fails
1717
fail-fast: false
1818
matrix:
19-
java: [11, 17, 21]
19+
java: [21]
2020

2121
runs-on: ubuntu-latest
2222

notifications/build.gradle

+21-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ buildscript {
2121
}
2222
opensearch_no_snapshot = opensearch_version.replace("-SNAPSHOT","")
2323
common_utils_version = System.getProperty("common_utils.version", opensearch_build)
24-
kotlin_version = System.getProperty("kotlin.version", "1.8.21")
24+
kotlin_version = System.getProperty("kotlin.version", "1.9.25")
2525
junit_version = System.getProperty("junit.version", "5.7.2")
2626
aws_version = System.getProperty("aws.version", "1.12.687")
27+
asm_version = System.getProperty("asm.version", "9.7")
2728
}
2829

2930
repositories {
@@ -41,6 +42,16 @@ buildscript {
4142
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.0"
4243
classpath "org.jacoco:org.jacoco.agent:0.8.11"
4344
}
45+
46+
configurations {
47+
classpath {
48+
resolutionStrategy {
49+
//in order to handle jackson's higher release version in shadow, this needs to be upgraded to latest
50+
force(group: "org.ow2.asm", name: "asm", version: asm_version)
51+
force(group: "org.ow2.asm", name: "asm-commons", version: asm_version)
52+
}
53+
}
54+
}
4455
}
4556

4657
apply plugin: 'base'
@@ -58,11 +69,18 @@ allprojects {
5869
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
5970
}
6071
group = "org.opensearch"
72+
6173
plugins.withId('java') {
62-
sourceCompatibility = targetCompatibility = "11"
74+
sourceCompatibility = JavaVersion.VERSION_21
75+
targetCompatibility = JavaVersion.VERSION_21
6376
}
6477
plugins.withId('org.jetbrains.kotlin.jvm') {
65-
compileKotlin.kotlinOptions.jvmTarget = compileTestKotlin.kotlinOptions.jvmTarget = "11"
78+
compileJava.sourceCompatibility = JavaVersion.VERSION_21
79+
compileJava.targetCompatibility = JavaVersion.VERSION_21
80+
compileTestJava.sourceCompatibility = JavaVersion.VERSION_21
81+
compileTestJava.targetCompatibility = JavaVersion.VERSION_21
82+
compileKotlin.kotlinOptions.jvmTarget = "21"
83+
compileTestKotlin.kotlinOptions.jvmTarget = "21"
6684
compileKotlin.dependsOn ktlint
6785
}
6886
}

notifications/core-spi/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin
77

88
plugins {
9-
id 'com.github.johnrengelman.shadow'
9+
id 'io.github.goooler.shadow' version "8.1.7"
1010
id 'jacoco'
1111
id 'maven-publish'
1212
id 'signing'

0 commit comments

Comments
 (0)