I largely figured out how to get the grpc plugin t...
# general
n
I largely figured out how to get the grpc plugin to work in pants, and it mainly comes down to some configuration inside of
pants.ini
that looks much like this:
Copy code
[gen.protoc]
version: 3.5.1
protoc_plugins: ['grpc-java']
supportdir: %(pants_supportdir)s/proto/
extra_path: %(pants_supportdir)s/proto/osx/
javadeps: ['3rdparty/jvm/com/google/protobuf']
The issue I need to figure out now is how to make the value of the
extra_path
field platform dependent, b/c the grpc-java plugins are built for os x vs. linux vs. windows. It looks to me like the
supportdir
argument is used in conjunction with the
version
and the
binary_util
module to choose a platform-specific version of
protoc
(e.g., https://github.com/pantsbuild/pants/blob/master/src/python/pants/backend/codegen/protobuf/java/protobuf_gen.py#L88 )-- is there a way that I can simulate essentially the same behavior, but applied to the
extra_path
argument instead? (If not, I'm happy to add it via a PR)