diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 7e1b70b3..5c38dd56 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -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: diff --git a/.github/workflows/notifications-test-and-build-workflow.yml b/.github/workflows/notifications-test-and-build-workflow.yml index 45b9d36f..19bd98b4 100644 --- a/.github/workflows/notifications-test-and-build-workflow.yml +++ b/.github/workflows/notifications-test-and-build-workflow.yml @@ -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 @@ -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 diff --git a/.github/workflows/security-notifications-test-workflow.yml b/.github/workflows/security-notifications-test-workflow.yml index ba0b6ea3..2db46e1e 100644 --- a/.github/workflows/security-notifications-test-workflow.yml +++ b/.github/workflows/security-notifications-test-workflow.yml @@ -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 diff --git a/notifications/build.gradle b/notifications/build.gradle index 7fee3d04..8c30d841 100644 --- a/notifications/build.gradle +++ b/notifications/build.gradle @@ -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 { @@ -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' @@ -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 } } diff --git a/notifications/core-spi/build.gradle b/notifications/core-spi/build.gradle index 453322d6..e8ccf372 100644 --- a/notifications/core-spi/build.gradle +++ b/notifications/core-spi/build.gradle @@ -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'