Skip to content
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
17 changes: 12 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ plugins {
id 'nebula.ospackage' version "8.3.0" apply false
id "com.diffplug.gradle.spotless" version "3.26.1"
id 'java-library'
id 'org.gradle.test-retry' version '1.3.1'
// Gradle 7.6 support was added in test-retry 1.4.0.
id 'org.gradle.test-retry' version '1.4.1'
}

tasks.withType(JavaCompile) {
Expand All @@ -75,6 +76,14 @@ tasks.withType(Test) {
systemProperty "file.encoding", "UTF-8"
jvmArgs("--add-opens", "java.base/java.time=ALL-UNNAMED")
jvmArgs("--add-opens", "java.base/java.util.stream=ALL-UNNAMED")

// PowerMock related tests like SearchFeatureDaoTests relies on modifying the bytecode of
// classes during runtime, which can conflict with the module system introduced in Java 9.
// To resolve this issue, we use the --add-opens option to explicitly open the java.util
// and java.lang package to PowerMock. This option allows PowerMock to access non-public
// members of the java.util and java.lang package.
jvmArgs('--add-opens', 'java.base/java.util=ALL-UNNAMED')
jvmArgs('--add-opens', 'java.base/java.lang=ALL-UNNAMED')
}
tasks.withType(Javadoc) {
options.encoding = 'UTF-8'
Expand Down Expand Up @@ -134,7 +143,6 @@ configurations.all {
if (it.state != Configuration.State.UNRESOLVED) return
resolutionStrategy {
force "joda-time:joda-time:${versions.joda}"
force "com.fasterxml.jackson.core:jackson-core:2.14.1"
force "commons-logging:commons-logging:${versions.commonslogging}"
force "org.apache.httpcomponents:httpcore:${versions.httpcore}"
force "commons-codec:commons-codec:${versions.commonscodec}"
Expand Down Expand Up @@ -733,8 +741,8 @@ dependencies {
compileOnly "org.opensearch:opensearch-job-scheduler-spi:${job_scheduler_version}"
implementation "org.opensearch:common-utils:${common_utils_version}"
implementation "org.opensearch.client:opensearch-rest-client:${opensearch_version}"
implementation group: 'com.google.guava', name: 'guava', version:'31.0.1-jre'
implementation group: 'com.google.guava', name: 'failureaccess', version:'1.0.1'
compileOnly group: 'com.google.guava', name: 'guava', version:'31.0.1-jre'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: these seemed to change in main in #770. Do you know why this was never moved to 2.x?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

not sure. Maybe due to my mistakes forgetting to add the changes to build.gradle when backporting.

compileOnly group: 'com.google.guava', name: 'failureaccess', version:'1.0.1'
implementation group: 'org.javassist', name: 'javassist', version:'3.28.0-GA'
implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.9'
Expand All @@ -747,7 +755,6 @@ dependencies {
implementation 'software.amazon.randomcutforest:randomcutforest-core:3.0-rc3'

// force Jackson version to avoid version conflict issue
implementation "com.fasterxml.jackson.core:jackson-core:2.14.1"
implementation "com.fasterxml.jackson.core:jackson-databind:2.14.1"
implementation "com.fasterxml.jackson.core:jackson-annotations:2.14.1"

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
269 changes: 164 additions & 105 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading