Getting Started with Bazel

Introducing Bazel

The landscape for build tools these days can be confusing, especially if there’s no clear “winner.” All too often, you hear users rave about their favorite tool and how it is most definitely more feature-rich, expressive, or performant than its competitors. A lot of build tool users have a biased, sometimes even religious, opinion. Without hands-on experience, it is very hard to distinguish between bias and hard facts.

It’s easy to decide on a build tool for a pet project based on personal preference; however, as soon as you plan to standardize on a tool on an enterprise-wide level, you’ll definitely have to consider more aspects. A wrong choice may cause a ripple effect across the organization, potentially resulting in unmaintainable builds, long-running build times, or a poor user experience.

Bazel, an open source build tool implemented and maintained by Google, is one of the newer players in the field. You might have heard of Blaze (Google’s internal build tool) at conferences in the past and are wondering whether the open source variant, Bazel, is for you. In this report, we’ll explore use cases, features, and usability concerns of Bazel. We’ll take a hard look at its benefits and shortcomings and work through concrete, Java-based examples to give you a first taste of its syntax and functionality. We’ll also see Bazel’s advanced features, like remote caching and execution.

After reading this report, you should be able to evaluate ...

Get Getting Started with Bazel now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.