From ff4a300ca856cd3c2e98c8ac9d099182a5ff963b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jul 2024 16:57:26 +0000 Subject: [PATCH 1/2] Bump com.google.protobuf:protoc from 3.2.0 to 4.27.2 Bumps [com.google.protobuf:protoc](https://github.com/protocolbuffers/protobuf) from 3.2.0 to 4.27.2. - [Release notes](https://github.com/protocolbuffers/protobuf/releases) - [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl) - [Commits](https://github.com/protocolbuffers/protobuf/commits) --- updated-dependencies: - dependency-name: com.google.protobuf:protoc dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 7b27686b..f121fd6b 100644 --- a/build.gradle +++ b/build.gradle @@ -55,7 +55,7 @@ protobuf { // The version of protoc must match protobuf-java. If you don't depend on // protobuf-java directly, you will be transitively depending on the // protobuf-java version that grpc depends on. - artifact = "com.google.protobuf:protoc:3.2.0" + artifact = "com.google.protobuf:protoc:4.27.2" } plugins { grpc { From 2720850c8257bf75fc5834ffd45f42958282d108 Mon Sep 17 00:00:00 2001 From: Rahul Arvikar Date: Tue, 6 Aug 2024 06:24:49 +0530 Subject: [PATCH 2/2] Add explicit protobuf-java dependency to match protoc version --- build.gradle | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 2ee02d0b..ce7f738a 100644 --- a/build.gradle +++ b/build.gradle @@ -42,8 +42,11 @@ apply plugin: 'signing' group = 'io.dgraph' archivesBaseName = 'dgraph4j' version = '21.12.0' -sourceCompatibility = 1.8 -targetCompatibility = 1.8 + +// Upgrade to Java SE 11 to match updated protobuf-protoc version. +// WARNING: Needs local toolchain upgrade from Java 8 to Java 11. +sourceCompatibility = 11 +targetCompatibility = 11 def grpcVersion = '1.65.1' def dgraph4jVersion = "$version" @@ -117,6 +120,11 @@ dependencies { compile "io.grpc:grpc-netty:${grpcVersion}" compile "io.grpc:grpc-stub:${grpcVersion}" + // Explicit matching of protobuf-java and protoc versions to address + // compilation errors arising due to transitive dependency on the version of + // protobuf-java that grpc depends on. + compile "com.google.protobuf:protobuf-java:4.27.2" + testCompile "io.opencensus:opencensus-api:${openCensusVersion}" testCompile "io.opencensus:opencensus-exporter-trace-jaeger:${openCensusVersion}" testRuntime "io.opencensus:opencensus-impl:${openCensusVersion}"