diff --git a/alts/build.gradle b/alts/build.gradle index 60f8fe1ed23..9a04f0dd090 100644 --- a/alts/build.gradle +++ b/alts/build.gradle @@ -37,10 +37,13 @@ dependencies { testImplementation project(':grpc-testing'), project(':grpc-testing-proto'), libraries.guava, - libraries.guava_testlib, libraries.junit, libraries.mockito, libraries.truth + + testImplementation (libraries.guava_testlib) { + exclude group: 'junit', module: 'junit' + } testRuntimeOnly libraries.netty_tcnative, libraries.netty_epoll signature 'org.codehaus.mojo.signature:java17:1.0@signature' diff --git a/api/build.gradle b/api/build.gradle index 3eaab4894f4..1574cdd8b4a 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -17,9 +17,10 @@ dependencies { testImplementation project(':grpc-context').sourceSets.test.output, project(':grpc-testing'), - project(':grpc-grpclb'), - libraries.guava_testlib - + project(':grpc-grpclb') + testImplementation (libraries.guava_testlib) { + exclude group: 'junit', module: 'junit' + } jmh project(':grpc-core') signature "org.codehaus.mojo.signature:java17:1.0@signature" diff --git a/build.gradle b/build.gradle index c699b7d595e..1c24a4dd6e1 100644 --- a/build.gradle +++ b/build.gradle @@ -50,7 +50,7 @@ subprojects { javaPluginPath = "$rootDir/compiler/build/exe/java_plugin/$protocPluginBaseName$exeSuffix" nettyVersion = '4.1.48.Final' - guavaVersion = '28.2-android' + guavaVersion = '29.0-android' googleauthVersion = '0.20.0' protobufVersion = '3.12.0' protocVersion = protobufVersion diff --git a/census/build.gradle b/census/build.gradle index 7925262ce3c..af5445a218c 100644 --- a/census/build.gradle +++ b/census/build.gradle @@ -17,7 +17,6 @@ dependencies { project(':grpc-context').sourceSets.test.output, project(':grpc-core').sourceSets.test.output, project(':grpc-testing'), - libraries.guava_testlib, libraries.opencensus_impl } diff --git a/context/build.gradle b/context/build.gradle index 1028ad2c628..4512cc56f0a 100644 --- a/context/build.gradle +++ b/context/build.gradle @@ -10,7 +10,10 @@ plugins { description = 'gRPC: Context' dependencies { - testImplementation libraries.jsr305, libraries.guava_testlib + testImplementation libraries.jsr305 + testImplementation (libraries.guava_testlib) { + exclude group: 'junit', module: 'junit' + } signature "org.codehaus.mojo.signature:java17:1.0@signature" signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4@signature" } diff --git a/context/src/test/java/io/grpc/ContextTest.java b/context/src/test/java/io/grpc/ContextTest.java index bf078fcff92..5171d4839a9 100644 --- a/context/src/test/java/io/grpc/ContextTest.java +++ b/context/src/test/java/io/grpc/ContextTest.java @@ -17,6 +17,7 @@ package io.grpc; import static io.grpc.Context.cancellableAncestor; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -24,7 +25,6 @@ import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/core/build.gradle b/core/build.gradle index 8ae917db506..ba20489f70c 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -23,9 +23,11 @@ dependencies { testImplementation project(':grpc-context').sourceSets.test.output, project(':grpc-api').sourceSets.test.output, project(':grpc-testing'), - project(':grpc-grpclb'), - libraries.guava_testlib - + project(':grpc-grpclb') + testImplementation (libraries.guava_testlib) { + exclude group: 'junit', module: 'junit' + } + testRuntimeOnly project(':grpc-census') jmh project(':grpc-testing') diff --git a/netty/src/test/java/io/grpc/netty/GrpcHttp2HeadersUtilsTest.java b/netty/src/test/java/io/grpc/netty/GrpcHttp2HeadersUtilsTest.java index 96d87a53789..9336035f897 100644 --- a/netty/src/test/java/io/grpc/netty/GrpcHttp2HeadersUtilsTest.java +++ b/netty/src/test/java/io/grpc/netty/GrpcHttp2HeadersUtilsTest.java @@ -20,8 +20,8 @@ import static io.grpc.internal.GrpcUtil.DEFAULT_MAX_HEADER_LIST_SIZE; import static io.netty.util.AsciiString.of; import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import com.google.common.collect.Iterables; diff --git a/repositories.bzl b/repositories.bzl index 7e714c194ba..62c9279c5d2 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -19,7 +19,7 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [ "com.google.code.gson:gson:jar:2.8.6", "com.google.errorprone:error_prone_annotations:2.3.4", "com.google.guava:failureaccess:1.0.1", - "com.google.guava:guava:28.2-android", + "com.google.guava:guava:29.0-android", "com.google.j2objc:j2objc-annotations:1.3", "com.google.truth:truth:1.0.1", "com.squareup.okhttp:okhttp:2.7.4", @@ -236,14 +236,13 @@ def com_google_errorprone_error_prone_annotations(): def com_google_guava_guava(): jvm_maven_import_external( name = "com_google_guava_guava", - artifact = "com.google.guava:guava:28.2-android", + artifact = "com.google.guava:guava:29.0-android", server_urls = ["https://repo.maven.apache.org/maven2/"], - artifact_sha256 = "1faf214c94723ab9fbadfedd9af88ddc325faf669e68eab04688c3afcf59c037", + artifact_sha256 = "00ba22cb0e32610db7cf8ab4c20017c85d11788600734ff1d86995345eb5bc3b", licenses = ["notice"], # Apache 2.0 ) def com_google_guava_failureaccess(): - # Not needed until Guava 27.0, but including now to ease upgrading of users. See #5214 jvm_maven_import_external( name = "com_google_guava_failureaccess", artifact = "com.google.guava:failureaccess:1.0.1", diff --git a/xds/build.gradle b/xds/build.gradle index d86750929b2..a5f87bdb486 100644 --- a/xds/build.gradle +++ b/xds/build.gradle @@ -48,8 +48,10 @@ dependencies { testImplementation project(':grpc-testing'), project(':grpc-testing-proto'), - libraries.guava_testlib, libraries.netty_epoll + testImplementation (libraries.guava_testlib) { + exclude group: 'junit', module: 'junit' + } shadow configurations.implementation.getDependencies().minus([nettyDependency]) shadow project(path: ':grpc-netty-shaded', configuration: 'shadow')