From 1795348b24e2c8457fdc030ce885aa1210afd451 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Thu, 15 Feb 2024 13:22:36 -0800 Subject: [PATCH] Remove semi-circular dependency between core and util Add the 'fake' dependency to grpc-netty instead of grpc-core. grpc-okhttp already depends on grpc-util and probably would be fine without round_robin on Android. There's not actually a circular dependency, but some tools can't handle the compile vs runtime distinction. Such tools are broken, but fixes have been slow and this approach works with no real downfalls. Works around #10576 #10701 --- core/build.gradle | 3 +-- netty/build.gradle | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index 3d5e20ad3c6..22c68b21147 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -19,8 +19,7 @@ description = 'gRPC: Core' dependencies { api project(':grpc-api') // force dependent jars to depend on latest grpc-context - runtimeOnly project(":grpc-context"), - project(":grpc-util") // need grpc-util to pull in round robin + runtimeOnly project(":grpc-context") implementation libraries.gson, libraries.android.annotations, libraries.animalsniffer.annotations, diff --git a/netty/build.gradle b/netty/build.gradle index c2bfe173d9c..81193c5c1ed 100644 --- a/netty/build.gradle +++ b/netty/build.gradle @@ -28,6 +28,7 @@ dependencies { libraries.errorprone.annotations, libraries.perfmark.api, libraries.netty.unix.common + runtimeOnly project(":grpc-util") // need grpc-util to pull in round robin // Tests depend on base class defined by core module. testImplementation testFixtures(project(':grpc-core')),