From 361ab069b32b9dbb47714b55c5a187324a11b47d Mon Sep 17 00:00:00 2001 From: Pierce Trey Date: Mon, 4 Apr 2022 14:13:24 -0600 Subject: [PATCH] use netty-shaded for client - avoid conflict with pb-grpc-client-kotlin netty version --- buildSrc/src/main/kotlin/kotlin/Dependencies.kt | 8 ++------ client/build.gradle.kts | 1 - .../provenance/objectstore/gateway/client/ClientConfig.kt | 2 +- .../objectstore/gateway/client/GatewayClient.kt | 2 +- example/build.gradle.kts | 1 - 5 files changed, 4 insertions(+), 10 deletions(-) diff --git a/buildSrc/src/main/kotlin/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/kotlin/Dependencies.kt index f79b967..9968b38 100644 --- a/buildSrc/src/main/kotlin/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/kotlin/Dependencies.kt @@ -1,8 +1,7 @@ object Versions { const val BouncyCastle = "1.70" - const val Grpc = "1.39.0" + const val Grpc = "1.45.1" const val GrpcSpringboot = "3.4.3" - const val GrpcNetty = "1.24.0" const val Jackson = "2.12.5" const val JacksonProtobuf = "0.9.12" const val Kotlin = "1.6.10" @@ -44,10 +43,7 @@ object Dependencies { val GrpcProtobuf = DependencySpec("io.grpc:grpc-protobuf", Versions.Grpc, exclude = listOf("com.google.protobuf:protobuf-java", "com.google.protobuf:protobuf-java-util")).include() val GrpcStub = DependencySpec("io.grpc:grpc-stub", Versions.Grpc).include() val GrpcSpringbootStarter = DependencySpec("io.github.lognet:grpc-spring-boot-starter", Versions.GrpcSpringboot).include() - } - - object Netty : DependencyCollector() { - val GrpcNetty = DependencySpec("io.grpc:grpc-netty", Versions.GrpcNetty).include() + val GrpcNetty = DependencySpec("io.grpc:grpc-netty-shaded", Versions.Grpc).include() } object Jackson : DependencyCollector() { diff --git a/client/build.gradle.kts b/client/build.gradle.kts index 86be31f..1e890cb 100644 --- a/client/build.gradle.kts +++ b/client/build.gradle.kts @@ -25,7 +25,6 @@ dependencies { listOf( *Dependencies.Grpc.all(), *Dependencies.Protobuf.all(), - *Dependencies.Netty.all(), *Dependencies.BouncyCastle.all(), *Dependencies.Provenance.all(), ).forEach { it.implementation(this) } diff --git a/client/src/main/kotlin/io/provenance/objectstore/gateway/client/ClientConfig.kt b/client/src/main/kotlin/io/provenance/objectstore/gateway/client/ClientConfig.kt index 1aa9150..3ef09d8 100644 --- a/client/src/main/kotlin/io/provenance/objectstore/gateway/client/ClientConfig.kt +++ b/client/src/main/kotlin/io/provenance/objectstore/gateway/client/ClientConfig.kt @@ -1,6 +1,6 @@ package io.provenance.objectstore.gateway.client -import io.grpc.netty.NettyChannelBuilder +import io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder import java.net.URI import java.util.concurrent.ExecutorService import java.util.concurrent.Executors diff --git a/client/src/main/kotlin/io/provenance/objectstore/gateway/client/GatewayClient.kt b/client/src/main/kotlin/io/provenance/objectstore/gateway/client/GatewayClient.kt index cfb0f56..0397aea 100644 --- a/client/src/main/kotlin/io/provenance/objectstore/gateway/client/GatewayClient.kt +++ b/client/src/main/kotlin/io/provenance/objectstore/gateway/client/GatewayClient.kt @@ -1,7 +1,7 @@ package io.provenance.objectstore.gateway.client import io.grpc.Deadline -import io.grpc.netty.NettyChannelBuilder +import io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder import io.provenance.objectstore.gateway.GatewayGrpc import io.provenance.objectstore.gateway.GatewayOuterClass import io.provenance.scope.encryption.crypto.SignerImpl diff --git a/example/build.gradle.kts b/example/build.gradle.kts index 85c6c11..d55e85c 100644 --- a/example/build.gradle.kts +++ b/example/build.gradle.kts @@ -28,5 +28,4 @@ dependencies { it.implementation(this) } implementation("io.provenance.model:metadata-asset-model:0.1.2") - implementation("io.grpc:grpc-netty:1.24.0") }