As of Bazel 0.16.0, all official Bazel releases have been using an embedded JDK. An embedded JDK allows us to exhaustively test Bazel itself on a specific JDK version and removes the need for users who don't use Bazel to build Java to install their own JDK.
Bazel is currently in homebrew core which does not allow one to include binaries in a formula but instead requires all binaries to be built from source. This policy is not compatible with embedding a JDK and so we have made the decision to move out of homebrew core and instead provide our very own homebrew tap.
You can make homebrew use our tap by (one time) running the below commands
Please note that if you have installed Bazel from the homebrew core formula in
the past you will have to uninstall it first by running
brew uninstall bazel.
(Thanks Jason Gavris for pointing this out!)
$ brew tap bazelbuild/tap
Having added our tap you can install Bazel via the install command
$ brew install bazelbuild/tap/bazel
and upgrade to a newer version via the upgrade command
$ brew upgrade bazel