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 cross-cluster-replication plugin 3.0.0 baseline JDK version to JDK 21 #1474

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
build-test-linux:
strategy:
matrix:
java: [11, 17]
java: [21]

name: Build CCR Plugin on Linux using Container Image
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
java:
- 17
- 21
os:
- windows-latest
- macos-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bwc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
runs-on: ubuntu-latest
steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 11
- name: Set Up JDK 21
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 21
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/security-knn-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ jobs:

steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 17
- name: Set Up JDK 21
uses: actions/setup-java@v1
with:
java-version: 17
java-version: 21
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v4
Expand Down Expand Up @@ -110,10 +110,10 @@ jobs:

steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 17
- name: Set Up JDK 21
uses: actions/setup-java@v1
with:
java-version: 17
java-version: 21
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The replication machinery is implemented as an OpenSearch plugin that exposes AP
The project in this package uses the [Gradle](https://docs.gradle.org/current/userguide/userguide.html) build system. Gradle comes with excellent documentation that should be your first stop when trying to figure out how to operate or modify the build.

### Building from the command line
Set JAVA_HOME to JDK-11 or above
Set JAVA_HOME to JDK-21 or above

1. `./gradlew build` builds and tests project.
2. `./gradlew clean release` cleans previous builds, creates new build and tests project.
Expand Down
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ buildscript {
plugin_previous_version = opensearch_previous_version.replaceAll(/(\.\d)([^\d]*)$/, '$1.0$2')

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")

security_plugin_version = opensearch_build
if (!isSnapshot) {
Expand Down Expand Up @@ -89,6 +89,10 @@ plugins {
allprojects {
group = "org.opensearch"
version = "${opensearch_build}"
plugins.withId('org.jetbrains.kotlin.jvm') {
compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaVersion.VERSION_21
compileTestJava.sourceCompatibility = compileTestJava.targetCompatibility = JavaVersion.VERSION_21
}
}

apply plugin: 'java'
Expand Down Expand Up @@ -165,14 +169,14 @@ repositories {

compileKotlin {
kotlinOptions {
jvmTarget = "11"
jvmTarget = "21"
freeCompilerArgs = ['-Xjsr305=strict'] // Handle OpenSearch @Nullable annotation correctly
}
}

compileTestKotlin {
kotlinOptions {
jvmTarget = "11"
jvmTarget = "21"
freeCompilerArgs = ['-Xjsr305=strict']
}
}
Expand Down
Loading