Skip to content

Commit 1d9e1b2

Browse files
committed
Centralize the officially supported bazel version
Add .bazelversion files so that workflows and contributors can automatically use the same supported/tested version of bazel. `examples/.bazelversion` could have been a symlink but decided against this to avoid causing problems on Windows.
1 parent 86fa860 commit 1d9e1b2

4 files changed

Lines changed: 25 additions & 2 deletions

File tree

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8.7.0

.github/workflows/testing.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ jobs:
8080
strategy:
8181
matrix:
8282
bzlmod: [true, false]
83-
env:
84-
USE_BAZEL_VERSION: 8.7.0
8583

8684
steps:
8785
- uses: actions/checkout@v4

COMPILING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,26 @@ $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses
150150

151151
# Add 'export ANDROID_HOME=$HOME/Android/Sdk' to your .bashrc or equivalent
152152
```
153+
154+
Building with Bazel
155+
===================
156+
157+
grpc-java can also be built using [Bazel](https://bazel.build/).
158+
159+
First [install bazelisk](https://github.com/bazelbuild/bazelisk#installation)
160+
(unlike Gradle, Bazel's wrapper isn't checked-in to the grpc-java repository).
161+
162+
To build the grpc-java library:
163+
```
164+
$ bazelisk build //...
165+
```
166+
167+
grpc-java intends to support the two most recent major versions of Bazel. By
168+
default, builds will use a known-working version. But you can specify a
169+
particular, different Bazel version like so:
170+
```
171+
$ USE_BAZEL_VERSION=8.x bazelisk build //...
172+
```
173+
174+
You cannot run the tests from Bazel at this time.
175+

examples/.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8.7.0

0 commit comments

Comments
 (0)