gRPC java的编译

gRPC-java代码生成器


  • gRPC-java的代码生成器编译需要先编译protobuf,否则会报c++源文件无法找到的错误
  • 如果只是编译gRPC,而不打算编译代码生成器,可以使用下面的方法解决(详情请移步官方讨论组):

If you are just going to build gRPC and try the examples, you can create the file "gradle.properties" under the project's root directory and add "skipCodegen=true" to it. This will skip the code generation.
(来自讨论组)

grpc-java has a C++ code generation plugin for protoc. Since many Java developers don't have C compilers installed and don't need to modify the codegen, the build can skip it. To skip, create the file /gradle.properties and add skipCodegen=true
(来自项目说明)

.

编译


cd $path_to_prj
./gradlew build
./gradlew install

你可能感兴趣的:(gRPC java的编译)