mirror of https://github.com/grpc/grpc-java.git
Protobuf uses Guava 30.1.1, so I upgrade it at the same time. It also caused an update to rules_jvm_external and reworking the Bazel build. Protobuf no longer requires bind() so they were dropped. Although Protobuf's protobuf_deps() brings in rules_jvm_external, and so we don't need to define it ourselves, it seems better to define it directly and not depend on transitive deps since we use it directly. Protobuf now has support for maven_install() by exposing PROTOBUF_MAVEN_ARTIFACTS, which required reorganizing the WORKSPACE to use maven_install() after loading protobuf. Protobuf still doesn't define target overrides for itself so we still maintain those. When reorganizing the WORKSPACE I noticed http_archive should ideally be above io_grpc_grpc_java as most users will need it there, so I fixed that since there were lots of other load()-reordering already. |
||
|---|---|---|
| .. | ||
| clientcache | ||
| helloworld | ||
| routeguide | ||
| strictmode | ||
| README.md | ||
README.md
gRPC Hello World Example (Android Java)
PREREQUISITES
-
Android Tutorial if you're new to Android development
-
We only have Android gRPC client in this example. Please follow examples in other languages to build and run a gRPC server.
INSTALL
-
Install gRPC Java library SNAPSHOT locally, including code generation plugin (Only need this step for non-released versions, e.g. master HEAD).
-
Install the app
$ cd helloworld # or "cd routeguide"
$ ../../gradlew installDebug
Please refer to the tutorial on how to use gRPC in Android programs.