Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support generate java-lite binding. #183

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion all/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ GEN_PYI=false
GEN_TYPESCRIPT=false
LINT=false
LINT_CHECKS=""
SUPPORTED_LANGUAGES=("go" "ruby" "csharp" "java" "python" "objc" "gogo" "php" "node" "typescript" "web" "cpp" "descriptor_set" "scala")
SUPPORTED_LANGUAGES=("go" "ruby" "csharp" "java" "python" "objc" "gogo" "php" "node" "typescript" "web" "cpp" "descriptor_set" "scala" "javalite")
EXTRA_INCLUDES=""
OUT_DIR=""
GO_SOURCE_RELATIVE=""
Expand Down Expand Up @@ -364,6 +364,9 @@ ${GO_PACKAGE_MAP}\
plugins=grpc+embedded\
:$OUT_DIR"
;;
"javalite")
GEN_STRING="--grpc_out=lite:$OUT_DIR --java_out=lite:$OUT_DIR --plugin=protoc-gen-grpc=$(which grpc_java_plugin)"
;;
"java")
GEN_STRING="--grpc_out=$OUT_DIR --${GEN_LANG}_out=$OUT_DIR --plugin=protoc-gen-grpc=$(which grpc_java_plugin)"
;;
Expand Down
19 changes: 19 additions & 0 deletions all/test/all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,25 @@ func (s *TestSuite) TestAllCases() {
},
extraArgs: []string{"-o", "gen/foo/bar"},
},
"javalite": {
lang: "javalite",
protofileName: "all/test/test.proto",
expectedOutputDir: "gen/pb-javalite",
fileExpectations: []FileExpectation{
{fileName: "Messages/Test.java"},
{fileName: "Messages/MessageGrpc.java"},
},
},
"javalite with alternative output dir": {
lang: "javalite",
protofileName: "all/test/test.proto",
expectedOutputDir: "gen/foo/bar",
fileExpectations: []FileExpectation{
{fileName: "Messages/Test.java"},
{fileName: "Messages/MessageGrpc.java"},
},
extraArgs: []string{"-o", "gen/foo/bar"},
},
"python": {
lang: "python",
protofileName: "all/test/test.proto",
Expand Down