diff --git a/google-cloud-bigquerydatatransfer/pom.xml b/google-cloud-bigquerydatatransfer/pom.xml index 94d82b406688..d0d037ddc854 100644 --- a/google-cloud-bigquerydatatransfer/pom.xml +++ b/google-cloud-bigquerydatatransfer/pom.xml @@ -19,10 +19,6 @@ ${project.version} - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -41,7 +37,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index a4004bb8b425..b866beec9466 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -18,10 +18,6 @@ google-cloud-bigtable - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -50,7 +46,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-bom/pom.xml b/google-cloud-bom/pom.xml index 5f0c2743d743..5e892dd11cd9 100644 --- a/google-cloud-bom/pom.xml +++ b/google-cloud-bom/pom.xml @@ -127,9 +127,9 @@ 1.23.0 1.2.0 - 1.17.0 - 1.17.0 - 0.34.0 + 1.18.0 + 1.18.0 + 0.35.0 0.1.29 1.0.5 0.9.0 @@ -897,6 +897,11 @@ grpc-netty ${grpc.version} + + io.grpc + grpc-netty-shaded + ${grpc.version} + io.grpc grpc-stub diff --git a/google-cloud-container/pom.xml b/google-cloud-container/pom.xml index 9273fcceef2f..2116e6e097fa 100644 --- a/google-cloud-container/pom.xml +++ b/google-cloud-container/pom.xml @@ -19,10 +19,6 @@ ${project.version} - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -41,7 +37,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-core-grpc/pom.xml b/google-cloud-core-grpc/pom.xml index 5f135de5b792..2dbc4efa33da 100644 --- a/google-cloud-core-grpc/pom.xml +++ b/google-cloud-core-grpc/pom.xml @@ -18,10 +18,6 @@ google-cloud-core-grpc - - io.netty - netty-tcnative-boringssl-static - com.google.auth google-auth-library-credentials @@ -67,7 +63,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-dataproc/pom.xml b/google-cloud-dataproc/pom.xml index b9d8f69fe677..d61c2b7acde8 100644 --- a/google-cloud-dataproc/pom.xml +++ b/google-cloud-dataproc/pom.xml @@ -18,10 +18,6 @@ google-cloud-dataproc - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -40,7 +36,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-dialogflow/pom.xml b/google-cloud-dialogflow/pom.xml index d392eeea48ea..855a9a21f99c 100644 --- a/google-cloud-dialogflow/pom.xml +++ b/google-cloud-dialogflow/pom.xml @@ -18,10 +18,6 @@ google-cloud-dialogflow-v2beta1 - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -36,7 +32,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-dlp/pom.xml b/google-cloud-dlp/pom.xml index 09b13fb6bc31..16ba8372188d 100644 --- a/google-cloud-dlp/pom.xml +++ b/google-cloud-dlp/pom.xml @@ -18,10 +18,6 @@ google-cloud-dlp-v2beta1 - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -36,7 +32,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-errorreporting/pom.xml b/google-cloud-errorreporting/pom.xml index caef20fd9171..1f8272133ca2 100644 --- a/google-cloud-errorreporting/pom.xml +++ b/google-cloud-errorreporting/pom.xml @@ -18,10 +18,6 @@ google-cloud-errorreporting - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -36,7 +32,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-firestore/pom.xml b/google-cloud-firestore/pom.xml index 0d438b5d3fd7..7f98b1e816aa 100644 --- a/google-cloud-firestore/pom.xml +++ b/google-cloud-firestore/pom.xml @@ -21,10 +21,6 @@ google-cloud-firestore - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -57,7 +53,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-language/pom.xml b/google-cloud-language/pom.xml index a363fc6f0adc..11109c3e9bea 100644 --- a/google-cloud-language/pom.xml +++ b/google-cloud-language/pom.xml @@ -18,10 +18,6 @@ google-cloud-language - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -40,7 +36,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-logging/pom.xml b/google-cloud-logging/pom.xml index 5374bc23e1ba..2ff255d92f53 100644 --- a/google-cloud-logging/pom.xml +++ b/google-cloud-logging/pom.xml @@ -18,10 +18,6 @@ google-cloud-logging - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -40,7 +36,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/testing/LocalLoggingHelper.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/testing/LocalLoggingHelper.java index 8585d6873079..a4378b04bb05 100644 --- a/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/testing/LocalLoggingHelper.java +++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/testing/LocalLoggingHelper.java @@ -14,42 +14,26 @@ package com.google.cloud.logging.v2.testing; - import io.grpc.ManagedChannel; import io.grpc.Server; -import io.grpc.netty.NegotiationType; -import io.grpc.netty.NettyChannelBuilder; -import io.grpc.netty.NettyServerBuilder; -import io.netty.channel.local.LocalAddress; -import io.netty.channel.local.LocalChannel; -import io.netty.channel.local.LocalServerChannel; - +import io.grpc.inprocess.InProcessChannelBuilder; +import io.grpc.inprocess.InProcessServerBuilder; import java.io.IOException; -import java.net.SocketAddress; /** * LocalLoggingHelper runs an in-memory Logging server for use in tests. */ public class LocalLoggingHelper { - private static final int FLOW_CONTROL_WINDOW = 65 * 1024; - - private final SocketAddress address; + private final String address; private final Server server; private final LocalLoggingImpl loggingImpl; - /** - * Constructs a new LocalLoggingHelper. The method start() must - * be called before it is used. - */ - public LocalLoggingHelper(String addressString) { - address = new LocalAddress(addressString); - loggingImpl = new LocalLoggingImpl(); - NettyServerBuilder builder = - NettyServerBuilder.forAddress(address) - .flowControlWindow(FLOW_CONTROL_WINDOW) - .channelType(LocalServerChannel.class); - builder.addService(loggingImpl.bindService()); - server = builder.build(); + /** Constructs a new LocalLoggingHelper. The method start() must be called before it is used. */ + public LocalLoggingHelper(String address) { + this.address = address; + this.loggingImpl = new LocalLoggingImpl(); + this.server = + InProcessServerBuilder.forName(address).addService(loggingImpl.bindService()).build(); } /** * Starts the in-memory service. @@ -77,10 +61,7 @@ public LocalLoggingImpl getLoggingImpl() { * Creates a channel for making requests to the in-memory service. */ public ManagedChannel createChannel() { - return NettyChannelBuilder.forAddress(address) - .negotiationType(NegotiationType.PLAINTEXT) - .channelType(LocalChannel.class) - .build(); + return InProcessChannelBuilder.forName(address).usePlaintext(true).build(); } /** * Shuts down the in-memory service. diff --git a/google-cloud-monitoring/pom.xml b/google-cloud-monitoring/pom.xml index a16b779fe88d..6412455eaa1b 100644 --- a/google-cloud-monitoring/pom.xml +++ b/google-cloud-monitoring/pom.xml @@ -18,10 +18,6 @@ google-cloud-monitoring - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -36,7 +32,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-notification/pom.xml b/google-cloud-notification/pom.xml index 047d6f302b48..9d4642f47984 100644 --- a/google-cloud-notification/pom.xml +++ b/google-cloud-notification/pom.xml @@ -21,10 +21,6 @@ google-cloud-notification - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -60,7 +56,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-os-login/pom.xml b/google-cloud-os-login/pom.xml index aeee0ddfd3a2..c433a23e539b 100644 --- a/google-cloud-os-login/pom.xml +++ b/google-cloud-os-login/pom.xml @@ -18,10 +18,6 @@ google-cloud-os-login - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -40,7 +36,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index 31ef597b08c4..1330efffbcdd 100644 --- a/google-cloud-pubsub/pom.xml +++ b/google-cloud-pubsub/pom.xml @@ -18,10 +18,6 @@ google-cloud-pubsub - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -40,7 +36,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-spanner/pom.xml b/google-cloud-spanner/pom.xml index 35550de0feda..dfdd8c37249a 100644 --- a/google-cloud-spanner/pom.xml +++ b/google-cloud-spanner/pom.xml @@ -52,10 +52,6 @@ - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -98,7 +94,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.opencensus diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java index b3d548546379..b5ca59c1b9c1 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java @@ -31,9 +31,9 @@ import com.google.common.collect.ImmutableSet; import io.grpc.ClientInterceptor; import io.grpc.ManagedChannel; -import io.grpc.netty.GrpcSslContexts; -import io.grpc.netty.NettyChannelBuilder; -import io.netty.handler.ssl.SslContext; +import io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts; +import io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder; +import io.grpc.netty.shaded.io.netty.handler.ssl.SslContext; import java.net.MalformedURLException; import java.net.URL; import java.util.List; @@ -79,7 +79,7 @@ public ServiceRpc create(SpannerOptions options) { private final int prefetchChunks; private final int numChannels; private final ImmutableMap sessionLabels; - + private SpannerOptions(Builder builder) { super(SpannerFactory.class, SpannerRpcFactory.class, builder, new SpannerDefaults()); numChannels = builder.numChannels; @@ -159,7 +159,7 @@ public Builder setSessionPoolOption(SessionPoolOptions sessionPoolOptions) { /** * Sets the labels to add to all Sessions created in this client. - * + * * @param sessionLabels Map from label key to label value. Label key and value cannot be null. * For more information on valid syntax see * @@ -173,7 +173,7 @@ public Builder setSessionLabels(Map sessionLabels) { this.sessionLabels = ImmutableMap.copyOf(sessionLabels); return this; } - + /** * Specifying this will allow the client to prefetch up to {@code prefetchChunks} {@code * PartialResultSet} chunks for each read and query. The data size of each chunk depends on the @@ -224,7 +224,7 @@ public SessionPoolOptions getSessionPoolOptions() { public Map getSessionLabels() { return sessionLabels; } - + public int getPrefetchChunks() { return prefetchChunks; } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java index 1cdcccfb7ec5..731cd1270d8d 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java @@ -24,7 +24,7 @@ import com.google.cloud.TransportOptions; import io.grpc.ManagedChannel; -import io.grpc.netty.NettyChannelBuilder; +import io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; @@ -86,7 +86,7 @@ public void testInvalidTransport() { thrown.expect(IllegalArgumentException.class); SpannerOptions.newBuilder().setTransportOptions(Mockito.mock(TransportOptions.class)); } - + @Test public void testInvalidSessionLabels() { thrown.expect(NullPointerException.class); @@ -94,7 +94,7 @@ public void testInvalidSessionLabels() { labels.put("env", null); SpannerOptions.newBuilder().setSessionLabels(labels); } - + @Test public void testNullSessionLabels() { thrown.expect(NullPointerException.class); diff --git a/google-cloud-speech/pom.xml b/google-cloud-speech/pom.xml index 23841bea5d6c..b69ea871c7bd 100644 --- a/google-cloud-speech/pom.xml +++ b/google-cloud-speech/pom.xml @@ -18,10 +18,6 @@ google-cloud-speech - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -40,7 +36,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-trace/pom.xml b/google-cloud-trace/pom.xml index 51102a9cc876..d165d6669e86 100644 --- a/google-cloud-trace/pom.xml +++ b/google-cloud-trace/pom.xml @@ -18,10 +18,6 @@ google-cloud-trace - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -40,7 +36,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-video-intelligence/pom.xml b/google-cloud-video-intelligence/pom.xml index a120c07f3405..b6ade7cbb5ac 100644 --- a/google-cloud-video-intelligence/pom.xml +++ b/google-cloud-video-intelligence/pom.xml @@ -18,10 +18,6 @@ google-cloud-video-intelligence - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -44,7 +40,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc diff --git a/google-cloud-vision/pom.xml b/google-cloud-vision/pom.xml index d947cec8e756..2f2f31595629 100644 --- a/google-cloud-vision/pom.xml +++ b/google-cloud-vision/pom.xml @@ -18,10 +18,6 @@ google-cloud-vision - - io.netty - netty-tcnative-boringssl-static - ${project.groupId} google-cloud-core @@ -40,7 +36,7 @@ io.grpc - grpc-netty + grpc-netty-shaded io.grpc