diff --git a/build.gradle b/build.gradle index f3ea259ae9..7741454701 100644 --- a/build.gradle +++ b/build.gradle @@ -8,8 +8,6 @@ buildscript { ext { opensearch_version = System.getProperty("opensearch.version", "1.3.4-SNAPSHOT") spring_version = "5.3.22" - jackson_version = "2.13.2" - jackson_databind_version = "2.13.2.2" } repositories { @@ -31,6 +29,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() @@ -128,7 +130,7 @@ subprojects { } configurations.all { - resolutionStrategy.force "com.fasterxml.jackson.core:jackson-databind:${jackson_databind_version}" + resolutionStrategy.force "com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}" } } checkstyle { diff --git a/opensearch/build.gradle b/opensearch/build.gradle index 88019a0542..e871224004 100644 --- a/opensearch/build.gradle +++ b/opensearch/build.gradle @@ -32,9 +32,9 @@ dependencies { compile project(':core') compile group: 'org.opensearch', name: 'opensearch', version: "${opensearch_version}" compile "io.github.resilience4j:resilience4j-retry:1.5.0" - compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jackson_version}" - compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_databind_version}" - compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${jackson_version}" + compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${versions.jackson}" + compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${versions.jackson_databind}" + compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${versions.jackson}" compile group: 'org.json', name: 'json', version:'20180813' compileOnly group: 'org.opensearch.client', name: 'opensearch-rest-high-level-client', version: "${opensearch_version}" compile group: 'org.opensearch', name:'opensearch-ml-client', version: '1.3.4.0-SNAPSHOT' diff --git a/protocol/build.gradle b/protocol/build.gradle index bd36f4dc06..8cbf694ff4 100644 --- a/protocol/build.gradle +++ b/protocol/build.gradle @@ -30,9 +30,9 @@ plugins { dependencies { compile group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' - compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jackson_version}" - compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_databind_version}" - compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${jackson_version}" + compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${versions.jackson}" + compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${versions.jackson_databind}" + compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${versions.jackson}" implementation 'com.google.code.gson:gson:2.8.9' compile project(':core') compile project(':opensearch')