Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update guava to 29.0 #7079

Merged
merged 12 commits into from Jun 3, 2020
7 changes: 5 additions & 2 deletions build.gradle
Expand Up @@ -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
Expand Down Expand Up @@ -187,7 +187,7 @@ subprojects {
// Jetty ALPN dependencies
jetty_alpn_agent: 'org.mortbay.jetty.alpn:jetty-alpn-agent:2.0.9'
]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove 8 white spaces

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// A util function to config guava dependency with transitive dependencies
// properly resolved for the failOnVersionConflict strategy.
guavaDependency = { configurationName ->
Expand Down Expand Up @@ -312,6 +312,9 @@ subprojects {
testCompile libraries.junit,
libraries.mockito,
libraries.truth
testImplementation (libraries.guava_testlib) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be done here. Search for usage of libraries.guava_testlib and change each of them with exclusion. (census/build.gradle uses libraries.guava_testlib but actually it should not)

exclude group: 'junit', module: 'junit'
}
}

compileTestJava {
Expand Down
2 changes: 1 addition & 1 deletion context/src/test/java/io/grpc/ContextTest.java
Expand Up @@ -17,14 +17,14 @@
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;
import static org.junit.Assert.assertNotNull;
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;

Expand Down
Expand Up @@ -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;
Expand Down
7 changes: 3 additions & 4 deletions repositories.bzl
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down