How to build grpc-java?

410 views
Skip to first unread message

Kyung Hwa Kim

unread,
Aug 13, 2018, 5:16:00 PM8/13/18
to grpc.io
Hi, I am trying to build grpc-java (to use protoc).

First, I noticed that the "Download the JARs" link in https://github.com/grpc/grpc-java is broken.

So, I tried to build grpc-java using the instruction here: https://github.com/grpc/grpc-java/blob/master/COMPILING.md
Then, I see the following error when I run $./gradlew build.

Please let me know if there is anything that I am missing. Thanks.

./gradlew build
*** Skipping the build of codegen and compilation of proto files because skipCodegen=true


> Task :grpc-alts:compileJava FAILED
/gapic-generator/grpc-java/alts/src/main/java/io/grpc/alts/AltsServerBuilder.java:34: error: cannot find symbol
import io.grpc.alts.internal.HandshakerServiceGrpc;
                           
^
  symbol
:   class HandshakerServiceGrpc
  location
: package io.grpc.alts.internal
/gapic-generator/grpc-java/alts/src/main/java/io/grpc/alts/internal/RpcProtocolVersionsUtil.java:20: error: package io.grpc.alts.internal.TransportSecurityCommon does not exist
import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions;
                                                   
^
/gapic-generator/grpc-java/alts/src/main/java/io/grpc/alts/internal/RpcProtocolVersionsUtil.java:21: error: package io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions does not exist
import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version;

                                                                        



Carl Mastrangelo

unread,
Aug 14, 2018, 3:55:45 PM8/14/18
to grpc.io
Sorry about the Jar download link being broken, Maven's website was updated recently and broke our links.  I opened https://github.com/grpc/grpc-java/issues/4756  to fix

The code generation step is necessary to make the .proto files into .java files.   You'll need to install Protobuf first, and then use gradle with skipCodegen=false (the default).
Reply all
Reply to author
Forward
0 new messages