mirror of https://github.com/grpc/grpc-java.git
all: Fix opencensus-api dependency conflict (#7739)
We depend on 0.28.0 while oauth2 depends on 0.24.0. This change replaces oauth2's opencensus-api dependency with our own.
This commit is contained in:
parent
90850128a6
commit
0fb2667c96
|
|
@ -22,12 +22,7 @@ dependencies {
|
|||
libraries.protobuf,
|
||||
libraries.conscrypt
|
||||
def nettyDependency = implementation project(':grpc-netty')
|
||||
implementation (libraries.google_auth_oauth2_http) {
|
||||
// prefer our own versions instead of google-auth-oauth2-http's dependency
|
||||
exclude group: 'com.google.guava', module: 'guava'
|
||||
// we'll always be more up-to-date
|
||||
exclude group: 'io.grpc', module: 'grpc-context'
|
||||
}
|
||||
googleOauth2Dependency 'implementation'
|
||||
guavaDependency 'implementation'
|
||||
compileOnly libraries.javax_annotation
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ dependencies {
|
|||
api project(':grpc-api'),
|
||||
libraries.google_auth_credentials
|
||||
guavaDependency 'implementation'
|
||||
testImplementation project(':grpc-testing'),
|
||||
libraries.google_auth_oauth2_http
|
||||
testImplementation project(':grpc-testing')
|
||||
googleOauth2Dependency 'testImplementation'
|
||||
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||||
signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4@signature"
|
||||
}
|
||||
|
|
|
|||
11
build.gradle
11
build.gradle
|
|
@ -239,6 +239,17 @@ subprojects {
|
|||
guavaDependency 'runtimeOnly'
|
||||
}
|
||||
|
||||
googleOauth2Dependency = { configurationName ->
|
||||
dependencies."$configurationName"(libraries.google_auth_oauth2_http) {
|
||||
exclude group: 'com.google.guava', module: 'guava'
|
||||
exclude group: 'io.grpc', module: 'grpc-context'
|
||||
exclude group: 'io.opencensus', module: 'opencensus-api'
|
||||
}
|
||||
dependencies.runtimeOnly project(':grpc-context')
|
||||
censusApiDependency 'runtimeOnly'
|
||||
guavaDependency 'runtimeOnly'
|
||||
}
|
||||
|
||||
// A util function to config perfmark dependency with transitive
|
||||
// dependencies properly resolved for the failOnVersionConflict strategy.
|
||||
perfmarkDependency = { configurationName ->
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ dependencies {
|
|||
project(':grpc-stub'),
|
||||
project(':grpc-testing'),
|
||||
project(path: ':grpc-xds', configuration: 'shadow'),
|
||||
libraries.google_auth_oauth2_http,
|
||||
libraries.junit,
|
||||
libraries.truth
|
||||
censusGrpcMetricDependency 'implementation'
|
||||
googleOauth2Dependency 'implementation'
|
||||
compileOnly libraries.javax_annotation
|
||||
runtimeOnly libraries.opencensus_impl,
|
||||
libraries.netty_tcnative,
|
||||
|
|
|
|||
Loading…
Reference in New Issue