Skip to Content
Beginning Bazel: Building and Testing for Java, Go, and More
book

Beginning Bazel: Building and Testing for Java, Go, and More

by P.J. McNerney
December 2019
Beginner to intermediate
197 pages
3h 32m
English
Apress
Content preview from Beginning Bazel: Building and Testing for Java, Go, and More
© P.J. McNerney 2020
P. McNerneyBeginning Bazelhttps://doi.org/10.1007/978-1-4842-5194-2_3

3. Your First Bazel Project

P. J. McNerney1 
(1)
Blackhawk, CO, USA
 

Now that you’ve downloaded and set up Bazel, the real fun begins. We’ll start with a small project just to get started and then build (no pun intended) from there.

By the end of this chapter, you will have your first Bazel project up and running and be able to build and test code.

Setting Up Your Workspace

Prior to adding any code, we establish a new Bazel project by creating a WORKSPACE file to a given directory.

Create a directory for your project and create an empty WORKSPACE file:
$ mkdir chapter_03 (or <name of your directory>)
$ cd chapter_03 (or <name of your directory>)
chapter_03$ touch WORKSPACE ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Jenkins 2.x Continuous Integration Cookbook - Third Edition

Jenkins 2.x Continuous Integration Cookbook - Third Edition

Mitesh Soni, Alan Mark Berg

Publisher Resources

ISBN: 9781484251942Purchase LinkPublisher Website