22 lines
452 B
Batchfile
Executable File
22 lines
452 B
Batchfile
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eu
|
|
|
|
SET "PROTO_DIR=.\api\proto\v1"
|
|
SET "PKG_ROOT_DIR=.\pkg\api\v1\java"
|
|
SET /A "PKG_DIR=%PKG_ROOT_DIR%\src\main\java"
|
|
|
|
rmdir %PKG_ROOT_DIR% /s
|
|
mkdir -p ${PKG_DIR}
|
|
|
|
protoc ^
|
|
--proto_path=${PROTO_DIR} ^
|
|
--proto_path=third_party ^
|
|
--java_out=${PKG_DIR} ^
|
|
--grpc-java_out=${PKG_DIR} ^
|
|
-I ${PROTO_DIR} ${PROTO_DIR}\**\*.proto
|
|
|
|
copy .\third_party\_pom.xml ${PKG_ROOT_DIR}\pom.xml
|
|
|
|
# https://programmer.group/use-of-grpc-in-rpc.html
|