---
nav: docs
---

<!DOCTYPE html>
<html lang="en" itemscope itemtype="https://schema.org/WebPage">
  {% include head.html %}
  <body>
    {% include header.html %}

    <div class="page-title-bar">
      <div class="container">
        <h1>Documentation</h1>
      </div>
    </div>

    <div class="container vpad">
      <div class="row">
        <div class="col-lg-3">
          <a class="btn btn-default btn-lg btn-block sidebar-toggle"
              data-toggle="collapse" href="#sidebar-nav" aria-expanded="false"
              aria-controls="sidebar-nav">
            <i class="glyphicon glyphicon-menu-hamburger"></i> Navigation
          </a>
          <nav class="sidebar collapse" id="sidebar-nav">
            <ul class="sidebar-nav">
              <li><a href="/versions/{{ site.version }}/bazel-overview.html">Bazel Overview</a></li>

              <li>
                <a class="sidebar-nav-heading" data-toggle="collapse"
                    href="#installing-menu" aria-expanded="false"
                    aria-controls="installing-menu">
                  Installing <span class="caret"></span>
                </a>
                <ul class="collapse sidebar-nav sidebar-submenu" id="installing-menu">
                  <li><a href="/versions/{{ site.version }}/install.html">Installing Bazel</a></li>
                  <li><a href="/versions/{{ site.version }}/install-ubuntu.html">Installing Bazel on Ubuntu</a></li>
                  <li><a href="/versions/{{ site.version }}/install-os-x.html">Installing Bazel on macOS (OS X)</a></li>
                  <li><a href="/versions/{{ site.version }}/install-windows.html">Installing Bazel on Windows</a></li>
                  <li><a href="/versions/{{ site.version }}/install-compile-source.html">Compile Bazel from Source</a></li>
                </ul>
              </li>

              <li><a href="/versions/{{ site.version }}/getting-started.html">Getting Started</a></li>

              <li>
                <a class="sidebar-nav-heading" data-toggle="collapse"
                    href="#tutorial-menu" aria-expanded="false"
                    aria-controls="tutorial-menu">
                  Tutorial <span class="caret"></span>
                </a>
                <ul class="collapse sidebar-nav sidebar-submenu" id="tutorial-menu">
                  <li><a href="/versions/{{ site.version }}/tutorial/java.html">Build a Java Project</a></li>
                  <li><a href="/versions/{{ site.version }}/tutorial/cpp.html">Build a C++ Project</a></li>
                  <li><a href="/versions/{{ site.version }}/tutorial/cpp-use-cases.html">Common C++ Use Cases</a></li>
                  <li>
                    <a class="sidebar-nav-heading" href="#app-menu"
                       data-toggle="collapse" aria-expanded="false" aria-controls="app-menu">
                      Build a Mobile Application
                    </a>
                    <ul class="collapse sidebar-nav sidebar-submenu" id="app-menu">
                      <li><a href="/versions/{{ site.version }}/tutorial/app.html">Introduction</a></li>
                      <li><a href="/versions/{{ site.version }}/tutorial/environment.html">Set Up Your Environment</a></li>
                      <li><a href="/versions/{{ site.version }}/tutorial/workspace.html">Set Up a Workspace</a></li>
                      <li><a href="/versions/{{ site.version }}/tutorial/android-app.html">Build an Android App</a></li>
                      <li><a href="/versions/{{ site.version }}/tutorial/ios-app.html">Build an iOS App</a></li>
                      <li><a href="/versions/{{ site.version }}/tutorial/backend-server.html">Build the Backend Server</a></li>
                      <li><a href="/versions/{{ site.version }}/tutorial/review.html">Review</a></li>
                    </ul>
                  </li>
                </ul>
              </li>
            </ul>
            <h3>Using Bazel</h3>
            <ul class="sidebar-nav">
              <li><a href="/versions/{{ site.version }}/build-ref.html">Concepts and Terminology</a></li>
              <li><a href="/versions/{{ site.version }}/bazel-user-manual.html">User Manual</a></li>

              <li>
                <a class="sidebar-nav-heading" data-toggle="collapse"
                    href="#java-menu" aria-expanded="false"
                    aria-controls="java-menu">
                  Java and Bazel <span class="caret"></span>
                </a>
                <ul class="collapse sidebar-nav sidebar-submenu" id="java-menu">
                  <li><a href="/versions/{{ site.version }}/tutorial/java.html">Tutorial: Build a Java Project</a></li>
                  <li><a href="/versions/{{ site.version }}/migrate-maven.html">Migrating from Maven to Bazel</a></li>
                  <li><a href="/versions/{{ site.version }}/generate-workspace.html">Generate External Dependencies from Maven</a></li>
                </ul>
              </li>

              <li><a href="/versions/{{ site.version }}/test-encyclopedia.html">Writing Tests</a></li>
              <li><a href="/versions/{{ site.version }}/query.html">Query Language</a></li>
              <li><a href="/versions/{{ site.version }}/query-how-to.html">Query How-To</a></li>
              <li><a href="/versions/{{ site.version }}/mobile-install.html">mobile-install (Android)</a></li>
              <li><a href="/versions/{{ site.version }}/external.html">External Dependencies</a></li>
              <li><a href="/versions/{{ site.version }}/command-line-reference.html">Command-line Reference</a></li>
              <li><a href="/versions/{{ site.version }}/output_directories.html">Output Directories</a></li>
              <li><a href="/versions/{{ site.version }}/windows.html">Bazel on Windows</a></li>
              <li><a href="/versions/{{ site.version }}/best-practices.html">Best Practices</a></li>
            </ul>
            {% include be-nav.html %}
            <h3>Extensions</h3>
            <ul class="sidebar-nav">
              <li><a href="/versions/{{ site.version }}/skylark/concepts.html">Overview</a></li>

              <li>
                <a class="sidebar-nav-heading" data-toggle="collapse"
                    href="#extensions-tutorials" aria-expanded="false"
                    aria-controls="extensions-tutorials">
                  Tutorials <span class="caret"></span>
                </a>
                <ul class="collapse sidebar-nav sidebar-submenu" id="extensions-tutorials">
                  <li><a href="/versions/{{ site.version }}/skylark/tutorial-sharing-variables.html">Sharing variables</a></li>
                  <li><a href="/versions/{{ site.version }}/skylark/tutorial-creating-a-macro.html">Creating a macro</a></li>
                  <li><a href="/versions/{{ site.version }}/skylark/cookbook.html">Examples</a></li>
                </ul>
              </li>

              <li>
                <a class="sidebar-nav-heading" data-toggle="collapse"
                    href="#extensions-concepts" aria-expanded="false"
                    aria-controls="extensions-concepts">
                  Concepts <span class="caret"></span>
                </a>
                <ul class="collapse sidebar-nav sidebar-submenu" id="extensions-concepts">
                  <li><a href="/versions/{{ site.version }}/skylark/macros.html">Macros</a></li>
                  <li><a href="/versions/{{ site.version }}/skylark/rules.html">Rules</a></li>
                  <li><a href="/versions/{{ site.version }}/skylark/depsets.html">Depsets</a></li>
                  <li><a href="/versions/{{ site.version }}/skylark/aspects.html">Aspects</a></li>
                  <li><a href="/versions/{{ site.version }}/skylark/repository_rules.html">Repository rules</a></li>
                  <li><a href="/versions/{{ site.version }}/rule-challenges.html">Challenges of writing rules</a></li>
                  <li><a href="/versions/{{ site.version }}/skylark/backward-compatibility.html">Backward compatibility</a></li>
                </ul>
              </li>

              <li><a href="/versions/{{ site.version }}/skylark/deploying.html">Packaging rules</a></li>
              <li><a href="https://skydoc.bazel.build" target="_blank">Documenting rules</a></li>
              <li><a href="/versions/{{ site.version }}/skylark/build-style.html">Style guide for BUILD files</a></li>
              <li><a href="/versions/{{ site.version }}/skylark/bzl-style.html">Style guide for bzl files</a></li>

              <li><a href="/versions/{{ site.version }}/skylark/lib/skylark-overview.html">Reference</a></li>
              <li><a href="/versions/{{ site.version }}/skylark/language.html">Language</a></li>
            </ul>
          </nav>
        </div>
        <div class="col-lg-9">
          <a id="gh-edit" class="gh-edit default-hidden"><i class="fa fa-pencil" aria-hidden="true"></i> Edit</a>
          <script>
            var versionDocsURLRegex = /\/versions\/[\w\.]+\/(.*)/;
            var ghDocsBazeURL = 'https://github.com/bazelbuild/bazel/tree/master/site/docs/';
            var editButton = document.getElementById('gh-edit');
            // if there is an edit button and we are not in the Build Encyclopedia
            if (editButton
                && window.location.pathname.match(versionDocsURLRegex)
                && window.location.pathname.lastIndexOf('/be/') == -1
                && window.location.pathname.lastIndexOf('/skylark/lib/') == -1) {
              var docFile = window.location.pathname.match(versionDocsURLRegex)[1];
              // some pages are not using markdown :(
              if (docFile !== 'bazel-user-manual.html'
                  && docFile !== 'build-ref.html'
                  && docFile !== 'query.html'
                  && docFile !== 'test-encyclopedia.html') {
                docFile = docFile.replace('html', 'md');
              }
              editButton.href = ghDocsBazeURL + docFile;
              editButton.style.visibility = 'visible';
            }
          </script>

          {{ content }}
        </div>
      </div>
    </div>

    <!-- satisfaction survey -->
    <script async="" defer="" src="//survey.g.doubleclick.net/async_survey?site=oohdpic4fyfp3jcnym6aqkdf3e"></script>

    {% include footer.html %}
  </body>
</html>
