Skip to content

Commit

Permalink
Set cross-cluster-replication plugin 3.0.0 baseline JDK version to JD…
Browse files Browse the repository at this point in the history
…K-21

Signed-off-by: aggarwalShivani <[email protected]>
  • Loading branch information
aggarwalShivani committed Jan 16, 2025
1 parent f7ecd2e commit f6280f7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
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
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

0 comments on commit f6280f7

Please sign in to comment.