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.
This commit is contained in:
pj committed 2026-04-25 18:06:37 +07:00
1 parent 96e716f727
commit 29d82d7f6e
1 file changed
+13
+13
View File
@@ -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")