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
5 changes: 4 additions & 1 deletion alts/build.gradle
Expand Up @@ -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'
Expand Down
5 changes: 3 additions & 2 deletions api/build.gradle
Expand Up @@ -18,8 +18,9 @@ dependencies {
testImplementation project(':grpc-context').sourceSets.test.output,
project(':grpc-testing'),
project(':grpc-grpclb'),
libraries.guava_testlib

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.

Remove the comma above, otherwise this is considered as appending its return value to the above list, although not breaking.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

exclude group: 'junit', module: 'junit'
}
jmh project(':grpc-core')

signature "org.codehaus.mojo.signature:java17:1.0@signature"
Expand Down
4 changes: 2 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
1 change: 0 additions & 1 deletion census/build.gradle
Expand Up @@ -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
}

Expand Down
5 changes: 4 additions & 1 deletion context/build.gradle
Expand Up @@ -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"
}
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
8 changes: 5 additions & 3 deletions core/build.gradle
Expand Up @@ -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')
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
6 changes: 4 additions & 2 deletions xds/build.gradle
Expand Up @@ -48,9 +48,11 @@ 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')

Expand Down