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

.

编译


cd $path_to_prj
./gradlew build
./gradlew install
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,993评论 19 139
  • /** 优才网公开课示例代码 观察者模式 Observer @author 优才网全栈工程师教研组 @seehtt...
    _EchoFly阅读 299评论 0 0
  • 进化之路 在How to Think Straight About Psychology中,作者认为: 为了理解什...
    一本正经的Stan阅读 645评论 0 2
  • 不小心晚起了10分钟 我就迟到了两刻钟 这里的人可真多呀 等了4趟才挤进地铁 刚来这里的人说 今天的天像是要下雪 ...
    rockpig阅读 168评论 0 0
  • 小弟晚上没吃晚饭要来我家取证件,我马上去厨房准备了白菜鸭架汤、老家烧烤、凉拌萝卜丝,他却只吃了老家烧烤,啃了...
    培训与文化宝华阅读 223评论 0 0