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.protobuf,
|
||||||
libraries.conscrypt
|
libraries.conscrypt
|
||||||
def nettyDependency = implementation project(':grpc-netty')
|
def nettyDependency = implementation project(':grpc-netty')
|
||||||
implementation (libraries.google_auth_oauth2_http) {
|
googleOauth2Dependency 'implementation'
|
||||||
// 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'
|
|
||||||
}
|
|
||||||
guavaDependency 'implementation'
|
guavaDependency 'implementation'
|
||||||
compileOnly libraries.javax_annotation
|
compileOnly libraries.javax_annotation
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ dependencies {
|
||||||
api project(':grpc-api'),
|
api project(':grpc-api'),
|
||||||
libraries.google_auth_credentials
|
libraries.google_auth_credentials
|
||||||
guavaDependency 'implementation'
|
guavaDependency 'implementation'
|
||||||
testImplementation project(':grpc-testing'),
|
testImplementation project(':grpc-testing')
|
||||||
libraries.google_auth_oauth2_http
|
googleOauth2Dependency 'testImplementation'
|
||||||
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
signature "org.codehaus.mojo.signature:java17:1.0@signature"
|
||||||
signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4@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'
|
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
|
// A util function to config perfmark dependency with transitive
|
||||||
// dependencies properly resolved for the failOnVersionConflict strategy.
|
// dependencies properly resolved for the failOnVersionConflict strategy.
|
||||||
perfmarkDependency = { configurationName ->
|
perfmarkDependency = { configurationName ->
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,10 @@ dependencies {
|
||||||
project(':grpc-stub'),
|
project(':grpc-stub'),
|
||||||
project(':grpc-testing'),
|
project(':grpc-testing'),
|
||||||
project(path: ':grpc-xds', configuration: 'shadow'),
|
project(path: ':grpc-xds', configuration: 'shadow'),
|
||||||
libraries.google_auth_oauth2_http,
|
|
||||||
libraries.junit,
|
libraries.junit,
|
||||||
libraries.truth
|
libraries.truth
|
||||||
censusGrpcMetricDependency 'implementation'
|
censusGrpcMetricDependency 'implementation'
|
||||||
|
googleOauth2Dependency 'implementation'
|
||||||
compileOnly libraries.javax_annotation
|
compileOnly libraries.javax_annotation
|
||||||
runtimeOnly libraries.opencensus_impl,
|
runtimeOnly libraries.opencensus_impl,
|
||||||
libraries.netty_tcnative,
|
libraries.netty_tcnative,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue