Merge pull request #190 from madongfly/fix

Fix breakage due to gRPC java package change: nano -> protobuf.nano
pull/3109/head
Xudong Ma 10 years ago
commit 7665cf3dde
  1. 2
      java/android/app/build.gradle
  2. 10
      java/android/app/src/main/java/io/grpc/helloworldexample/GreeterGrpc.java

@ -28,7 +28,7 @@ dependencies {
// You need to build the https://github.com/grpc/grpc-java // You need to build the https://github.com/grpc/grpc-java
// to obtain these libraries below. // to obtain these libraries below.
compile 'io.grpc:grpc-core:0.1.0-SNAPSHOT' compile 'io.grpc:grpc-core:0.1.0-SNAPSHOT'
compile 'io.grpc:grpc-nano:0.1.0-SNAPSHOT' compile 'io.grpc:grpc-protobuf-nano:0.1.0-SNAPSHOT'
compile 'io.grpc:grpc-okhttp:0.1.0-SNAPSHOT' compile 'io.grpc:grpc-okhttp:0.1.0-SNAPSHOT'
compile 'io.grpc:grpc-stub:0.1.0-SNAPSHOT' compile 'io.grpc:grpc-stub:0.1.0-SNAPSHOT'
} }

@ -15,15 +15,15 @@ public class GreeterGrpc {
Helloworld.HelloReply> METHOD_SAY_HELLO = Helloworld.HelloReply> METHOD_SAY_HELLO =
io.grpc.stub.Method.create( io.grpc.stub.Method.create(
io.grpc.MethodType.UNARY, "SayHello", io.grpc.MethodType.UNARY, "SayHello",
io.grpc.nano.NanoUtils.<Helloworld.HelloRequest>marshaller( io.grpc.protobuf.nano.NanoUtils.<Helloworld.HelloRequest>marshaller(
new io.grpc.nano.Parser<Helloworld.HelloRequest>() { new io.grpc.protobuf.nano.Parser<Helloworld.HelloRequest>() {
@Override @Override
public Helloworld.HelloRequest parse(com.google.protobuf.nano.CodedInputByteBufferNano input) throws IOException { public Helloworld.HelloRequest parse(com.google.protobuf.nano.CodedInputByteBufferNano input) throws IOException {
return Helloworld.HelloRequest.parseFrom(input); return Helloworld.HelloRequest.parseFrom(input);
} }
}), }),
io.grpc.nano.NanoUtils.<Helloworld.HelloReply>marshaller( io.grpc.protobuf.nano.NanoUtils.<Helloworld.HelloReply>marshaller(
new io.grpc.nano.Parser<Helloworld.HelloReply>() { new io.grpc.protobuf.nano.Parser<Helloworld.HelloReply>() {
@Override @Override
public Helloworld.HelloReply parse(com.google.protobuf.nano.CodedInputByteBufferNano input) throws IOException { public Helloworld.HelloReply parse(com.google.protobuf.nano.CodedInputByteBufferNano input) throws IOException {
return Helloworld.HelloReply.parseFrom(input); return Helloworld.HelloReply.parseFrom(input);
@ -176,4 +176,4 @@ public class GreeterGrpc {
} }
}))).build(); }))).build();
} }
} }

Loading…
Cancel
Save