From 1b543b919ed019e7811f279fc7ab9305a626129b Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Thu, 21 Nov 2019 12:33:48 +0100 Subject: [PATCH] mobile: add comments to build script --- mobile/gen_bindings.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/mobile/gen_bindings.sh b/mobile/gen_bindings.sh index 1a3488c5..8bb21039 100755 --- a/mobile/gen_bindings.sh +++ b/mobile/gen_bindings.sh @@ -19,11 +19,21 @@ else exit 1 fi +# Name of the package for the generated APIs. pkg="lndmobile" + +# The package where the protobuf definitions originally are found. target_pkg="github.com/lightningnetwork/lnd/lnrpc" -# Generate APIs by passing the parsed protos to the falafel plugin. -opts="package_name=$pkg,target_package=$target_pkg,listeners=lightning=lightningLis walletunlocker=walletUnlockerLis,mem_rpc=1" +# A mapping from grpc service to name of the custom listeners. The grpc server +# must be configured to listen on these. +listeners="lightning=lightningLis walletunlocker=walletUnlockerLis" + +# Set to 1 to create boiler plate grpc client code and listeners. If more than +# one proto file is being parsed, it should only be done once. +mem_rpc=1 + +opts="package_name=$pkg,target_package=$target_pkg,listeners=$listeners,mem_rpc=$mem_rpc" protoc -I/usr/local/include -I. \ -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ --plugin=protoc-gen-custom=$falafel\