From fd2f9011a962355b8f8a7f80bcbc59a15f5cc409 Mon Sep 17 00:00:00 2001 From: 0xbigapple Date: Thu, 23 Jul 2026 15:59:39 +0800 Subject: [PATCH 1/2] chore(deps): upgrade protoc-gen-grpc-java to 1.81.0 on macOS/arm64 Keep 1.60.0 on x86 Linux/Windows because grpc-java 1.64.x+ dropped CentOS 7 support. On macOS and arm64 hosts 1.60.0 ships no native aarch64 codegen binary, so resolve 1.81.0 there instead. --- build.gradle | 11 +++++++++++ core/build.gradle | 4 ++-- gradle/verification-metadata.xml | 14 ++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 82964d03..42204985 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,6 @@ +import org.gradle.nativeplatform.platform.internal.Architectures +import org.gradle.internal.os.OperatingSystem + def DEFAULT_VERSION = '1.0.0' def DEFAULT_GROUP = 'io.github.tronprotocol' @@ -22,6 +25,10 @@ apply plugin: 'java' apply plugin: 'java-library' apply plugin: 'maven-publish' +def arch = System.getProperty("os.arch").toLowerCase(Locale.ROOT) +def isArm64 = Architectures.AARCH64.isAlias(arch) +def isMac = OperatingSystem.current().isMacOsX() + ext { bouncycastleVersion = '1.84' junitJupiterVersion = '5.4.2' @@ -30,6 +37,10 @@ ext { // grpc-netty and netty are compatibility-coupled: each grpc-java release is // tested against a specific netty line, so bump these two together grpcVersion = '1.81.0' + // https://github.com/grpc/grpc-java/issues/7690 + // https://github.com/grpc/grpc-java/pull/12319, Add support for macOS aarch64 with universal binary + // https://github.com/grpc/grpc-java/pull/11371 , 1.64.x is not supported CentOS 7. + protocGenVersion = isArm64 || isMac ? '1.81.0' : '1.60.0' nettyVersion = '4.1.135.Final' vertxVersion = '4.5.27' } diff --git a/core/build.gradle b/core/build.gradle index 571120a6..13fe77fa 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -6,8 +6,8 @@ plugins { description 'Trident-Java gRPC core classes' def protobufVersion = '3.25.8' -// grpcVersion lives in the root ext block, next to the coupled nettyVersion -def protocGenVersion = '1.60.0' // https://github.com/grpc/grpc-java/pull/11371 , 1.64.x is not supported CentOS 7. +// grpcVersion and protocGenVersion live in the root ext block; protocGenVersion +// is platform-dependent (1.60.0 for CentOS 7 compat, 1.81.0 on macOS/arm64). dependencies { implementation "com.google.guava:guava:$googleGuavaVersion" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 7f4cb66e..89fb3fd3 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -463,6 +463,20 @@ + + + + + + + + + + + + + + From da6152effb7dd770cb30d384d0ed06b8036030c0 Mon Sep 17 00:00:00 2001 From: 0xbigapple Date: Thu, 23 Jul 2026 17:18:31 +0800 Subject: [PATCH 2/2] chore(core): drop stale comment in core/build.gradle --- core/build.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index 13fe77fa..e932b230 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -6,8 +6,6 @@ plugins { description 'Trident-Java gRPC core classes' def protobufVersion = '3.25.8' -// grpcVersion and protocGenVersion live in the root ext block; protocGenVersion -// is platform-dependent (1.60.0 for CentOS 7 compat, 1.81.0 on macOS/arm64). dependencies { implementation "com.google.guava:guava:$googleGuavaVersion"