diff --git a/build.gradle b/build.gradle index bcd49b9785..9477cac412 100644 --- a/build.gradle +++ b/build.gradle @@ -8,8 +8,6 @@ buildscript { ext { opensearch_version = System.getProperty("opensearch.version", "2.4.1-SNAPSHOT") spring_version = "5.3.22" - jackson_version = "2.14.1" - jackson_databind_version = "2.14.1" isSnapshot = "true" == System.getProperty("build.snapshot", "true") buildVersionQualifier = System.getProperty("build.version_qualifier", "") version_tokens = opensearch_version.tokenize('-') @@ -69,6 +67,10 @@ plugins { id 'jacoco' } +// import versions defined in https://github.com/opensearch-project/OpenSearch/blob/main/buildSrc/src/main/java/org/opensearch/gradle/OpenSearchJavaPlugin.java#L94 +// versions https://github.com/opensearch-project/OpenSearch/blob/main/buildSrc/version.properties +apply plugin: 'opensearch.java' + // Repository on root level is for dependencies that project code depends on. And this block must be placed after plugins{} repositories { mavenLocal() diff --git a/core/build.gradle b/core/build.gradle index eb70f110d1..67d1e36d36 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -45,9 +45,9 @@ dependencies { api group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' api group: 'com.facebook.presto', name: 'presto-matching', version: '0.240' api group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1' - api "com.fasterxml.jackson.core:jackson-core:${jackson_version}" - api "com.fasterxml.jackson.core:jackson-databind:${jackson_databind_version}" - api "com.fasterxml.jackson.core:jackson-annotations:${jackson_version}" + api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" + api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}" + api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" api project(':common') testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') diff --git a/integ-test/build.gradle b/integ-test/build.gradle index 454d67eca7..06b95f8dd3 100644 --- a/integ-test/build.gradle +++ b/integ-test/build.gradle @@ -66,9 +66,10 @@ configurations.all { // enforce 1.1.3, https://www.whitesourcesoftware.com/vulnerability-database/WS-2019-0379 resolutionStrategy.force 'commons-codec:commons-codec:1.13' resolutionStrategy.force 'com.google.guava:guava:31.0.1-jre' - resolutionStrategy.force "com.fasterxml.jackson.core:jackson-core:${jackson_version}" - resolutionStrategy.force "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${jackson_version}" - resolutionStrategy.force "com.fasterxml.jackson.core:jackson-databind:${jackson_databind_version}" + resolutionStrategy.force "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" + resolutionStrategy.force "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}" + resolutionStrategy.force "com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}" + resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib:1.6.0" resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-common:1.6.0" resolutionStrategy.force "com.squareup.okhttp3:okhttp:4.9.3" diff --git a/opensearch/build.gradle b/opensearch/build.gradle index 7ad7d63546..6eeab86fff 100644 --- a/opensearch/build.gradle +++ b/opensearch/build.gradle @@ -32,9 +32,9 @@ dependencies { api project(':core') api group: 'org.opensearch', name: 'opensearch', version: "${opensearch_version}" implementation "io.github.resilience4j:resilience4j-retry:1.5.0" - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jackson_version}" - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_databind_version}" - implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${jackson_version}" + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${versions.jackson}" + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${versions.jackson_databind}" + implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${versions.jackson}" implementation group: 'org.json', name: 'json', version:'20180813' compileOnly group: 'org.opensearch.client', name: 'opensearch-rest-high-level-client', version: "${opensearch_version}" implementation group: 'org.opensearch', name:'opensearch-ml-client', version: "${opensearch_build}" diff --git a/plugin/build.gradle b/plugin/build.gradle index 6a0900c3cc..10c26ef79a 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -84,12 +84,12 @@ configurations.all { // conflict with spring-jcl exclude group: "commons-logging", module: "commons-logging" // enforce 2.12.6, https://github.com/opensearch-project/sql/issues/424 - resolutionStrategy.force "com.fasterxml.jackson.core:jackson-core:${jackson_version}" + resolutionStrategy.force "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" // enforce 1.1.3, https://www.whitesourcesoftware.com/vulnerability-database/WS-2019-0379 resolutionStrategy.force 'commons-codec:commons-codec:1.13' resolutionStrategy.force 'com.google.guava:guava:31.0.1-jre' - resolutionStrategy.force "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${jackson_version}" - resolutionStrategy.force "com.fasterxml.jackson.core:jackson-databind:${jackson_databind_version}" + resolutionStrategy.force "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}" + resolutionStrategy.force "com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}" resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib:1.6.0" resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-common:1.6.0" resolutionStrategy.force "com.squareup.okhttp3:okhttp:4.9.3" @@ -104,9 +104,9 @@ compileTestJava { dependencies { api group: 'org.springframework', name: 'spring-beans', version: "${spring_version}" - api "com.fasterxml.jackson.core:jackson-core:${jackson_version}" - api "com.fasterxml.jackson.core:jackson-databind:${jackson_databind_version}" - api "com.fasterxml.jackson.core:jackson-annotations:${jackson_version}" + api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" + api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}" + api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" api project(":ppl") diff --git a/prometheus/build.gradle b/prometheus/build.gradle index 45a3a4a8ed..d614d13522 100644 --- a/prometheus/build.gradle +++ b/prometheus/build.gradle @@ -17,9 +17,9 @@ repositories { dependencies { api project(':core') implementation "io.github.resilience4j:resilience4j-retry:1.5.0" - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jackson_version}" - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_databind_version}" - implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${jackson_version}" + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${versions.jackson}" + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${versions.jackson_databind}" + implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${versions.jackson}" implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.9.3' implementation 'com.github.babbel:okhttp-aws-signer:1.0.2' implementation group: 'org.json', name: 'json', version: '20180813' diff --git a/protocol/build.gradle b/protocol/build.gradle index 9c41fbf101..5d32a235ea 100644 --- a/protocol/build.gradle +++ b/protocol/build.gradle @@ -30,9 +30,9 @@ plugins { dependencies { implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jackson_version}" - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_databind_version}" - implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${jackson_version}" + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${versions.jackson}" + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${versions.jackson_databind}" + implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${versions.jackson}" implementation 'com.google.code.gson:gson:2.8.9' implementation project(':core') implementation project(':opensearch') @@ -44,7 +44,7 @@ dependencies { } configurations.all { - resolutionStrategy.force "com.fasterxml.jackson.core:jackson-databind:${jackson_databind_version}" + resolutionStrategy.force "com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}" } test {