examples: support retry policy example for bazel build

According to the docs, I can use bazel to build examples, but
retry-example is not supported in bazel config. So If you'll try to
build this example with bazel, you'll get an error:


```
examples git:(master) ✗ bazel build :retrying-hello-world-server :retrying-hello-world-client
ERROR: Skipping ':retrying-hello-world-client': no such target '//:retrying-hello-world-client': target 'retrying-hello-world-client' not declared in package '' defined by /Users/rostik404/projects/grpc-java/examples/BUILD.bazel
ERROR: no such target '//:retrying-hello-world-client': target 'retrying-hello-world-client' not declared in package '' defined by /Users/rostik404/projects/grpc-java/examples/BUILD.bazel
INFO: Elapsed time: 0.331s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
```
This commit is contained in:
Rostislav 2024-04-02 01:07:10 +03:00 committed by GitHub
parent 8050723397
commit 58de563fa4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 17 additions and 0 deletions

View File

@ -248,3 +248,20 @@ java_grpc_library(
deps = ["@io_grpc_grpc_proto//:health_java_proto"],
)
java_binary(
name = "retrying-hello-world-client",
testonly = 1,
main_class = "io.grpc.examples.retrying.RetryingHelloWorldClient",
runtime_deps = [
":examples",
],
)
java_binary(
name = "retrying-hello-world-server",
testonly = 1,
main_class = "io.grpc.examples.retrying.RetryingHelloWorldServer",
runtime_deps = [
":examples",
],
)