blob: 59c3ebf2ec848914164db3e5e7124b50e2ce74b1 [file] [log] [blame] [view]
zhangkun83d54a4632015-01-26 10:53:17 -08001gRPC Java Plugin for Protobuf Compiler
2==============================================
3
4This generates the Java interfaces out of the service definition from a `.proto` file.
5
6## System Requirement
7
8* Linux
9* The Github head of [Protobuf](https://github.com/google/protobuf) installed
10* [Gradle](https://www.gradle.org/downloads) installed
11
12## Compiling and Testing the Plugin
13Change to the `compiler` directory:
14```
15$ cd $GRPC_JAVA_ROOT/compiler
16```
17
18To compile the plugin:
19```
20$ gradle java_pluginExecutable
21```
22
23To test the plugin with the compiler:
24```
25$ gradle test
26```
27You will see a `PASS` if the test succeeds.
28
29To compile a proto file and generate Java interfaces out of the service definitions:
30```
31$ protoc --plugin=protoc-gen-java_rpc=build/binaries/java_pluginExecutable/java_plugin \
32 --java_rpc_out="$OUTPUT_FILE" --proto_path="$DIR_OF_PROTO_FILE" "$PROTO_FILE"
33```