Skip to content

Commit 6aa72b7

Browse files
authored
docs: Document use with Bazel, like Maven & Gradle (fixes #10215) (#10217)
* docs: Document use with Bazel, like Maven & Gradle (fixes #10215)
1 parent b77f0a0 commit 6aa72b7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ implementation 'io.grpc:grpc-stub:1.54.1'
9494
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
9595
```
9696

97+
For [Bazel](https://bazel.build), you can either
98+
[use Maven](https://github.com/bazelbuild/rules_jvm_external)
99+
(with the GAVs from above), or use `@io_grpc_grpc_java//api` et al (see below).
100+
97101
[the JARs]:
98102
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.54.1
99103

@@ -207,6 +211,11 @@ protobuf {
207211
208212
```
209213

214+
For [Bazel](https://bazel.build), use the [`proto_library`](https://github.com/bazelbuild/rules_proto)
215+
and the [`java_proto_library`](https://bazel.build/reference/be/java#java_proto_library) (no `load()` required)
216+
and `load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")` (from this project), as in
217+
[this example `BUILD.bazel`](https://github.com/grpc/grpc-java/blob/master/examples/BUILD.bazel).
218+
210219
API Stability
211220
-------------
212221

0 commit comments

Comments
 (0)