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

Revert "[Backport] [2.x] Restore support for Java 8 (#767) (#777)" #800

Merged
merged 1 commit into from
Jan 3, 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
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Bumps `org.apache.httpcomponents.client5:httpclient5` from 5.2.1 to 5.3

### Changed
- Restore support for Java 8 ([#767](https://github.com/opensearch-project/opensearch-java/pull/767))

### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The below matrix shows the compatibility of the [`opensearch-java-client`](https
| Client Version | JDK |
|----------------|--------------------|
| 1.0.0 | 8 |
| 2.x.0 | 8 / 11 / 17 / 21 |
| 2.x.0 | 11 / 17 / 21 |

## Upgrading

Expand Down
46 changes: 3 additions & 43 deletions java-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ configurations {
}

java {
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11

withJavadocJar()
withSourcesJar()
Expand Down Expand Up @@ -146,20 +146,15 @@ val integrationTest = task<Test>("integrationTest") {
System.getProperty("tests.awsSdk2support.domainRegion", "us-east-1"))
}

val opensearchVersion = "2.12.0-SNAPSHOT"

dependencies {

val opensearchVersion = "2.7.0"
val jacksonVersion = "2.15.2"
val jacksonDatabindVersion = "2.15.2"

// Apache 2.0
implementation("org.opensearch.client", "opensearch-rest-client", opensearchVersion)
testImplementation("org.opensearch.test", "framework", opensearchVersion)
testImplementation("org.hamcrest:hamcrest:2.2")
testImplementation("com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.8.1") {
exclude(group = "junit")
}

// Apache 2.0
// https://search.maven.org/artifact/com.google.code.findbugs/jsr305
Expand Down Expand Up @@ -332,38 +327,3 @@ publishing {
}
}
}

if (JavaVersion.current() >= JavaVersion.VERSION_11) {
val java11: SourceSet = sourceSets.create("java11") {
java {
compileClasspath += sourceSets.main.get().output + sourceSets.test.get().output
runtimeClasspath += sourceSets.main.get().output + sourceSets.test.get().output
srcDir("src/test/java11")
}
}

configurations[java11.implementationConfigurationName].extendsFrom(configurations.testImplementation.get())
configurations[java11.runtimeOnlyConfigurationName].extendsFrom(configurations.testRuntimeOnly.get())

dependencies {
testImplementation("org.opensearch.test", "framework", opensearchVersion) {
exclude(group = "org.hamcrest")
}
}

tasks.named<JavaCompile>("compileJava11Java") {
targetCompatibility = JavaVersion.VERSION_11.toString()
sourceCompatibility = JavaVersion.VERSION_11.toString()
}

tasks.named<JavaCompile>("compileTestJava") {
targetCompatibility = JavaVersion.VERSION_11.toString()
sourceCompatibility = JavaVersion.VERSION_11.toString()
}

tasks.test {
testClassesDirs += java11.output.classesDirs
classpath = sourceSets["java11"].runtimeClasspath
}

}
Loading