From ba9d3919d36bc0e9a12a826d85396f8f529c7824 Mon Sep 17 00:00:00 2001 From: ivanauth Date: Fri, 10 Oct 2025 13:47:55 -0400 Subject: [PATCH] Fix Maven dependency convergence errors Add exclusions and explicit versions to resolve conflicts from #151 --- build.gradle | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 5c78f44e..139f8513 100644 --- a/build.gradle +++ b/build.gradle @@ -101,17 +101,32 @@ sourceSets { main { dependencies { implementation("io.grpc:grpc-protobuf:${grpcVersion}") { exclude group: 'com.google.protobuf', module: 'protobuf-java' + exclude group: 'com.google.api.grpc', module: 'proto-google-common-protos' } - api "com.google.protobuf:protobuf-java:${protocVersion}" implementation "io.grpc:grpc-stub:${grpcVersion}" runtimeOnly "io.grpc:grpc-netty-shaded:${grpcVersion}" compileOnly "org.apache.tomcat:annotations-api:6.0.53" - implementation "com.google.api.grpc:proto-google-common-protos:2.61.3" - implementation("build.buf:protovalidate:1.0.0") + implementation("build.buf:protovalidate:1.0.0") { + exclude group: 'com.google.protobuf', module: 'protobuf-java' + exclude group: 'com.google.protobuf', module: 'protobuf-java-util' + exclude group: 'com.google.code.gson', module: 'gson' + exclude group: 'com.google.re2j', module: 're2j' + } // In the future this can probably be removed in favor of "protovalidate" // See https://buf.build/blog/protoc-gen-validate-v1-and-v2 - implementation("build.buf.protoc-gen-validate:pgv-java-stub:1.2.1") + implementation("build.buf.protoc-gen-validate:pgv-java-stub:1.2.1") { + exclude group: 'com.google.protobuf', module: 'protobuf-java' + exclude group: 'com.google.protobuf', module: 'protobuf-java-util' + exclude group: 'com.google.code.gson', module: 'gson' + exclude group: 'com.google.re2j', module: 're2j' + } + + api "com.google.protobuf:protobuf-java:${protocVersion}" + implementation "com.google.protobuf:protobuf-java-util:${protocVersion}" + implementation "com.google.api.grpc:proto-google-common-protos:2.61.3" + implementation "com.google.code.gson:gson:2.11.0" + implementation "com.google.re2j:re2j:1.8" } // There is no pre-packaged JAR available that contains the gRPC Gateway proto files