Skip to content

Commit

Permalink
Set notifications plugin 3.0.0 baseline JDK version to JDK-21 (opense…
Browse files Browse the repository at this point in the history
…arch-project#973)

* Set notifications plugin 3.0.0 baseline JDK version to JDK-21

Signed-off-by: Andriy Redko <[email protected]>

* Review code review comments

Signed-off-by: Andriy Redko <[email protected]>

---------

Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta authored Oct 22, 2024
1 parent b04dc08 commit a546251
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 17
java-version: 21
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/notifications-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# This setting says that all jobs should finish, even if one fails
fail-fast: false
matrix:
java: [11, 17, 21]
java: [21]

# Job name
name: Build Notifications with JDK ${{ matrix.java }} on linux
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
# This setting says that all jobs should finish, even if one fails
fail-fast: false
matrix:
java: [11, 17, 21]
java: [21]
os: [ windows-latest, macos-latest ]
include:
- os: windows-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security-notifications-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
# This setting says that all jobs should finish, even if one fails
fail-fast: false
matrix:
java: [11, 17, 21]
java: [21]

runs-on: ubuntu-latest

Expand Down
24 changes: 21 additions & 3 deletions notifications/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ buildscript {
}
opensearch_no_snapshot = opensearch_version.replace("-SNAPSHOT","")
common_utils_version = System.getProperty("common_utils.version", opensearch_build)
kotlin_version = System.getProperty("kotlin.version", "1.8.21")
kotlin_version = System.getProperty("kotlin.version", "1.9.25")
junit_version = System.getProperty("junit.version", "5.7.2")
aws_version = System.getProperty("aws.version", "1.12.687")
asm_version = System.getProperty("asm.version", "9.7")
}

repositories {
Expand All @@ -41,6 +42,16 @@ buildscript {
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.0"
classpath "org.jacoco:org.jacoco.agent:0.8.11"
}

configurations {
classpath {
resolutionStrategy {
//in order to handle jackson's higher release version in shadow, this needs to be upgraded to latest
force(group: "org.ow2.asm", name: "asm", version: asm_version)
force(group: "org.ow2.asm", name: "asm-commons", version: asm_version)
}
}
}
}

apply plugin: 'base'
Expand All @@ -58,11 +69,18 @@ allprojects {
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
}
group = "org.opensearch"

plugins.withId('java') {
sourceCompatibility = targetCompatibility = "11"
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
plugins.withId('org.jetbrains.kotlin.jvm') {
compileKotlin.kotlinOptions.jvmTarget = compileTestKotlin.kotlinOptions.jvmTarget = "11"
compileJava.sourceCompatibility = JavaVersion.VERSION_21
compileJava.targetCompatibility = JavaVersion.VERSION_21
compileTestJava.sourceCompatibility = JavaVersion.VERSION_21
compileTestJava.targetCompatibility = JavaVersion.VERSION_21
compileKotlin.kotlinOptions.jvmTarget = "21"
compileTestKotlin.kotlinOptions.jvmTarget = "21"
compileKotlin.dependsOn ktlint
}
}
Expand Down
2 changes: 1 addition & 1 deletion notifications/core-spi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin

plugins {
id 'com.github.johnrengelman.shadow'
id 'io.github.goooler.shadow' version "8.1.7"
id 'jacoco'
id 'maven-publish'
id 'signing'
Expand Down

0 comments on commit a546251

Please sign in to comment.