Yuta HIGUCHI | a246224 | 2017-06-29 15:13:47 -0700 | [diff] [blame^] | 1 | #!/bin/bash -e |
Aaron Kruglikov | e630fb1 | 2017-04-24 13:05:26 -0700 | [diff] [blame] | 2 | # ----------------------------------------------------------------------------- |
| 3 | # Generates the gRPC java artifacts from protobuf models. |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | out=$1 |
| 6 | shift |
| 7 | proto_paths=$1 |
| 8 | shift |
| 9 | protoc=$1 |
| 10 | shift |
| 11 | plugin=$1 |
| 12 | shift |
| 13 | |
| 14 | #set -x |
| 15 | |
| 16 | dir=$(dirname $out) |
| 17 | mkdir -p $dir |
| 18 | |
| 19 | $protoc \ |
| 20 | --plugin=protoc-gen-grpc-java=$plugin \ |
| 21 | --grpc-java_out=$dir \ |
| 22 | --java_out=$dir \ |
| 23 | $proto_paths \ |
| 24 | $* |
| 25 | |
| 26 | cd $dir |
| 27 | jar -cf $out * |