Skip to content

Commit

Permalink
Set ml-commons plugin 3.0.0 baseline JDK version to JDK-21
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta committed Jun 20, 2024
1 parent 01c85cb commit 58c3f43
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/CI-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
needs: Get-CI-Image-Tag
strategy:
matrix:
java: [11, 17, 21]
java: [21]

name: Build and Test MLCommons Plugin on linux
if: github.repository == 'opensearch-project/ml-commons'
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
needs: Build-ml-linux
strategy:
matrix:
java: [11, 17, 21]
java: [21]

name: Test MLCommons Plugin on linux docker
if: github.repository == 'opensearch-project/ml-commons'
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
Build-ml-windows:
strategy:
matrix:
java: [11, 17, 21]
java: [21]
name: Build and Test MLCommons Plugin on Windows
if: github.repository == 'opensearch-project/ml-commons'
environment: ml-commons-cicd-env
Expand Down
15 changes: 14 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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('-')
Expand Down Expand Up @@ -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 {
Expand All @@ -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'
}
Expand Down
4 changes: 2 additions & 2 deletions client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand Down
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion memory/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion ml-algorithms/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 6 additions & 1 deletion plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -30,6 +30,11 @@ ext {
noticeFile = rootProject.file('NOTICE')
}

java {
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_21
}

lombok {
version = "1.18.30"
}
Expand Down
2 changes: 1 addition & 1 deletion search-processors/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion spi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 58c3f43

Please sign in to comment.