The first step in this tutorial is to set up your environment.
Here, you'll do the following:
Follow the installation instructions to install Bazel and its dependencies.
Do the following:
Download and install the Android SDK Tools.
Run the Android SDK Manager and install the following packages:
|Android SDK Platform Tools||
|Android SDK Build Tools||
|Android SDK Platform||
The SDK Manager is an executable named
android located in the
If you are following the steps in this tutorial on Mac OS X, download and install Xcode. The Xcode download contains the iOS libraries, Objective-C compiler other tools required by Bazel to build the iOS app.
You also need to get the sample project for the tutorial from GitHub:
The GitHub repo has two branches:
branch contains the source files for the project only. You'll use the files in
this branch in this tutorial. The
master branch contains both the source files
and completed Bazel
BUILD files. You can use the files in this
branch to check your work when you've completed the tutorial steps.
Enter the following at the command line to get the files in the
$ cd $HOME $ git clone -b source-only https://github.com/bazelbuild/examples
git clone command creates a directory named
directory contains several sample projects for Bazel. The project files for this
tutorial are in
Now that you have set up your environment, you can set up a Bazel workspace.