From 29d82d7f6e8a0c3632f32642b2d0b4bcde2d22c5 Mon Sep 17 00:00:00 2001 From: PJ Date: Sat, 25 Apr 2026 18:06:37 +0700 Subject: [PATCH] fix(sidecar): align grpc-netty/grpc-okhttp with grpc-core version Maestro 1.40.0 brings grpc-netty:1.50.2 which compiled against AbstractManagedChannelImplBuilder, removed in grpc-core 1.64+. Gradle was upgrading grpc-core to 1.68.0 while leaving grpc-netty at 1.50.2, causing NoClassDefFoundError at startup. Force grpc-netty and grpc-okhttp to match grpcVersion so all gRPC artifacts are binary-compatible. --- sidecar/build.gradle.kts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sidecar/build.gradle.kts b/sidecar/build.gradle.kts index d39585d..e87f6ab 100644 --- a/sidecar/build.gradle.kts +++ b/sidecar/build.gradle.kts @@ -23,6 +23,19 @@ val grpcVersion = "1.68.0" val protobufVersion = "3.25.5" val maestroVersion = "1.40.0" +// Maestro pulls in grpc-netty:1.50.2 and grpc-okhttp:1.50.2 which were compiled +// against AbstractManagedChannelImplBuilder that was removed in grpc-core 1.64+. +// Force them to match the grpc-core version we resolve to. +configurations.all { + resolutionStrategy.eachDependency { + if (requested.group == "io.grpc" && + (requested.name == "grpc-netty" || requested.name == "grpc-okhttp")) { + useVersion(grpcVersion) + because("align grpc transport with grpc-core version") + } + } +} + dependencies { implementation("dev.mobile:maestro-client:$maestroVersion") implementation("dev.mobile:maestro-utils:$maestroVersion")