diff --git a/build.gradle b/build.gradle index d8eb55a347..de733abfa6 100644 --- a/build.gradle +++ b/build.gradle @@ -11,6 +11,7 @@ buildscript { isSnapshot = "true" == System.getProperty("build.snapshot", "true") opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT") buildVersionQualifier = System.getProperty("build.version_qualifier", "") + asm_version = "9.7" // 2.0.0-rc1-SNAPSHOT -> 2.0.0.0-rc1-SNAPSHOT version_tokens = opensearch_version.tokenize('-') @@ -43,6 +44,16 @@ buildscript { } } } + + 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) + } + } + } } plugins { @@ -61,8 +72,10 @@ allprojects { apply from: "$rootDir/build-tools/repositories.gradle" plugins.withId('java') { - sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_21; + targetCompatibility = JavaVersion.VERSION_21; } + plugins.withId('jacoco') { jacoco.toolVersion = '0.8.10' } diff --git a/client/build.gradle b/client/build.gradle index 40e0743910..ff84be1059 100644 --- a/client/build.gradle +++ b/client/build.gradle @@ -7,9 +7,9 @@ plugins { id 'java' id "io.freefair.lombok" id 'jacoco' - id 'com.github.johnrengelman.shadow' + id 'io.github.goooler.shadow' version "8.1.7" id 'maven-publish' - id 'com.diffplug.spotless' version '6.23.0' + id 'com.diffplug.spotless' version '6.25.0' id 'signing' } diff --git a/common/build.gradle b/common/build.gradle index 619f8dffe5..e4aeea542a 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -6,7 +6,7 @@ //TODO: cleanup gradle config file, some overlap plugins { id 'java' - id 'com.github.johnrengelman.shadow' + id 'io.github.goooler.shadow' version "8.1.7" id 'jacoco' id "io.freefair.lombok" id 'maven-publish' diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7f93135c49..d64cd49177 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b446fa9a15..d296387b57 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionSha256Sum=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew.bat b/gradlew.bat index 6689b85bee..7101f8e467 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/memory/build.gradle b/memory/build.gradle index c102948bd7..d833f0b0a4 100644 --- a/memory/build.gradle +++ b/memory/build.gradle @@ -20,7 +20,7 @@ plugins { id 'java' id 'jacoco' id "io.freefair.lombok" - id 'com.diffplug.spotless' version '6.23.0' + id 'com.diffplug.spotless' version '6.25.0' } dependencies { diff --git a/ml-algorithms/build.gradle b/ml-algorithms/build.gradle index 6e44a8e8a9..e97849b019 100644 --- a/ml-algorithms/build.gradle +++ b/ml-algorithms/build.gradle @@ -9,7 +9,7 @@ plugins { id 'java' id 'jacoco' id "io.freefair.lombok" - id 'com.diffplug.spotless' version '6.23.0' + id 'com.diffplug.spotless' version '6.25.0' } repositories { diff --git a/plugin/build.gradle b/plugin/build.gradle index 4921d73acc..fddb8f00e9 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -13,7 +13,7 @@ plugins { id "io.freefair.lombok" id 'jacoco' id 'java-library' - id 'com.diffplug.spotless' version '6.23.0' + id 'com.diffplug.spotless' version '6.25.0' } ext { @@ -30,6 +30,11 @@ ext { noticeFile = rootProject.file('NOTICE') } +java { + targetCompatibility = JavaVersion.VERSION_21 + sourceCompatibility = JavaVersion.VERSION_21 +} + lombok { version = "1.18.30" } diff --git a/search-processors/build.gradle b/search-processors/build.gradle index cbb7e045bc..cfef1379dd 100644 --- a/search-processors/build.gradle +++ b/search-processors/build.gradle @@ -19,7 +19,7 @@ plugins { id 'java' id 'jacoco' id "io.freefair.lombok" - id 'com.diffplug.spotless' version '6.23.0' + id 'com.diffplug.spotless' version '6.25.0' } repositories { diff --git a/spi/build.gradle b/spi/build.gradle index 5f0596f013..cae8ba7275 100644 --- a/spi/build.gradle +++ b/spi/build.gradle @@ -7,7 +7,7 @@ import com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin import org.opensearch.gradle.test.RestIntegTestTask plugins { - id 'com.github.johnrengelman.shadow' + id 'io.github.goooler.shadow' version "8.1.7" id 'jacoco' id 'maven-publish' id 'signing'