diff --git a/temporal-serviceclient/build.gradle b/temporal-serviceclient/build.gradle index c52bde00f..f476f4890 100644 --- a/temporal-serviceclient/build.gradle +++ b/temporal-serviceclient/build.gradle @@ -60,11 +60,11 @@ protobuf { // protoc and protoc-gen-grpc-java versions are selected to be compatible // with the oldest supported versions of protoc and grpc artifacts. protoc { - artifact = 'com.google.protobuf:protoc:3.10.1' + (System.getProperty("os.arch") == 'aarch64' ? ':osx-x86_64' : '') + artifact = 'com.google.protobuf:protoc:3.10.1' + (System.getProperty("os.arch") == 'aarch64' && System.getProperty("os.name") == 'Mac OS X' ? ':osx-x86_64' : '') } plugins { grpc { - artifact = 'io.grpc:protoc-gen-grpc-java:1.34.1' + (System.getProperty("os.arch") == 'aarch64' ? ':osx-x86_64' : '') + artifact = 'io.grpc:protoc-gen-grpc-java:1.34.1' + (System.getProperty("os.arch") == 'aarch64' && System.getProperty("os.name") == 'Mac OS X' ? ':osx-x86_64' : '') } } generateProtoTasks { diff --git a/temporal-test-server/build.gradle b/temporal-test-server/build.gradle index 4f07b34a8..a6bb98f94 100644 --- a/temporal-test-server/build.gradle +++ b/temporal-test-server/build.gradle @@ -62,11 +62,11 @@ protobuf { // protoc and protoc-gen-grpc-java versions are selected to be compatible // with the oldest supported versions of protoc and grpc artifacts. protoc { - artifact = 'com.google.protobuf:protoc:3.10.1' + (System.getProperty("os.arch") == 'aarch64' ? ':osx-x86_64' : '') + artifact = 'com.google.protobuf:protoc:3.10.1' + (System.getProperty("os.arch") == 'aarch64' && System.getProperty("os.name") == 'Mac OS X' ? ':osx-x86_64' : '') } plugins { grpc { - artifact = 'io.grpc:protoc-gen-grpc-java:1.34.1' + (System.getProperty("os.arch") == 'aarch64' ? ':osx-x86_64' : '') + artifact = 'io.grpc:protoc-gen-grpc-java:1.34.1' + (System.getProperty("os.arch") == 'aarch64' && System.getProperty("os.name") == 'Mac OS X' ? ':osx-x86_64' : '') } } generateProtoTasks {