Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set ml-commons plugin 3.0.0 baseline JDK version to JDK-21 #2583

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/CI-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ jobs:
role-to-assume: ${{ secrets.ML_ROLE }}
aws-region: us-west-2

- name: Setup Java ${{ matrix.java }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should fix the compilation problem (but sadly GA does not pick the workflow from the pull request)

uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

- name: Checkout MLCommons
uses: actions/checkout@v3
with:
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 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

//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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See please GradleUp/shadow#908

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
Loading