git clone http://github.com/grpc/grpc.git
in a convenient directorygit checkout <tag>
(current is v1.26.0
, commithash de893acb
)mkdir -p third_party/grpc/bazel
cp <gRPC git tree>/bazel/{BUILD,cc_grpc_library.bzl,generate_cc.bzl,protobuf.bzl} third_party/grpc/bazel
third_party/grpc
directory, apply local patches: patch -p3 < bazel.patch
v1.26.0
from https://github.com/grpc/grpc-javacp -R <grpc-java git tree>/compiler/src/java_plugin third_party/grpc/compiler/src
Download the necessary jars at version 1.26.0
from maven central.