From dbe557f917b8af186ecc56b3a7911b8e49828784 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 12 Apr 2021 13:23:15 -0400 Subject: [PATCH] google-http-java-client-jackson2 with dependency exclusions --- build.gradle | 22 ++++++++++++---------- xds/build.gradle | 7 +++++++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index 6d9c4b71d4e..e27b1477144 100644 --- a/build.gradle +++ b/build.gradle @@ -57,6 +57,7 @@ subprojects { nettyVersion = '4.1.52.Final' guavaVersion = '30.0-android' googleauthVersion = '0.25.2' + googlehttpVersion = '1.39.1' protobufVersion = '3.12.0' protocVersion = protobufVersion opencensusVersion = '0.28.0' @@ -155,6 +156,7 @@ subprojects { google_api_protos: 'com.google.api.grpc:proto-google-common-protos:2.0.1', google_auth_credentials: "com.google.auth:google-auth-library-credentials:${googleauthVersion}", google_auth_oauth2_http: "com.google.auth:google-auth-library-oauth2-http:${googleauthVersion}", + google_http_client_jackson2: "com.google.http-client:google-http-client-jackson2:${googlehttpVersion}", okhttp: 'com.squareup.okhttp:okhttp:2.7.4', okio: 'com.squareup.okio:okio:1.17.5', opencensus_api: "io.opencensus:opencensus-api:${opencensusVersion}", @@ -254,16 +256,6 @@ subprojects { dependencies.runtimeOnly project(':grpc-context') censusApiDependency 'runtimeOnly' guavaDependency 'runtimeOnly' - - // We can remove this dependency override once org.apache.httpcomponents:httpclient:4.5.13 - // is released with org.apache.httpcomponents:httpcore:4.4.14 dependency, and - // com.google.http-client:google-http-client:1.39.1 is upgraded with them. - // https://github.com/grpc/grpc-java/issues/8037 - configurations.all { - resolutionStrategy { - force 'org.apache.httpcomponents:httpcore:4.4.14' - } - } } // A util function to config perfmark dependency with transitive @@ -299,6 +291,16 @@ subprojects { ])) { runtimeClasspath { resolutionStrategy.failOnVersionConflict() + + // We can remove this dependency override once org.apache.httpcomponents:httpclient:4.5.13 + // is released with org.apache.httpcomponents:httpcore:4.4.14 dependency, and + // com.google.http-client:google-http-client:1.39.1 is upgraded with them. + // https://github.com/grpc/grpc-java/issues/8037 + configurations.all { + resolutionStrategy { + force 'org.apache.httpcomponents:httpcore:4.4.14' + } + } } } } diff --git a/xds/build.gradle b/xds/build.gradle index d8462c0de54..585fea42ef4 100644 --- a/xds/build.gradle +++ b/xds/build.gradle @@ -37,6 +37,7 @@ dependencies { libraries.re2j, libraries.bouncycastle, libraries.autovalue_annotation + def nettyDependency = implementation project(':grpc-netty') implementation (libraries.opencensus_proto) { @@ -51,6 +52,12 @@ dependencies { exclude group: 'com.google.errorprone', module: 'error_prone_annotations' } + implementation (libraries.google_http_client_jackson2) { + exclude group: 'com.google.guava', module: 'guava' + exclude group: 'com.google.errorprone', module: 'error_prone_annotations' + exclude group: 'io.grpc', module: 'grpc-context' + } + testImplementation project(':grpc-core').sourceSets.test.output annotationProcessor libraries.autovalue