Introduction to Bazel
Bazel is a build system (analogous to make, ant, etc.) that promises better dependency analysis, faster builds and better reproducibility. One of the goals of Bazel is to make it easy to be extended to support multiple languages; Currently extensions exist for most of the popular programming languages.
Bazel is a fork of Blaze, Google’s internal build system, so it has been battle tested on very large codebases.
Installation
For up-to-date instructions, visit the official Bazel documentation
To install in Ubuntu based systems, we need to first register the software source:
1
2
3
4
sudo apt install curl gnupg
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
sudo mv bazel.gpg /etc/apt/trusted.gpg.d/
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
And then install it:
1
sudo apt update && sudo apt install bazel