美文网首页Java World
gRPC java的编译

gRPC java的编译

作者: Mr_Shang | 来源:发表于2016-09-29 14:53 被阅读230次

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 <project-root>/gradle.properties and add skipCodegen=true
(来自项目说明)

.

编译


cd $path_to_prj
./gradlew build
./gradlew install

相关文章

网友评论

    本文标题:gRPC java的编译

    本文链接:https://www.haomeiwen.com/subject/hxakyttx.html