Bazel Blog

Bazel 0.22

The Bazel team is happy to announce a new version of Bazel, Bazel 0.22.

Breaking changes

Upcoming changes

This release is a migration window for the following changes.

General Changes

  • now supports versioned documentation. Use the selector at the top of the navigation bar to switch between documentation for different Bazel releases.

  • set projectId in all PublishBuildToolEventStreamRequest


  • mobile-install now works with aapt2. Try it out with bazel mobile-install --android_aapt=aapt2 //my:target

  • Fixed issues with mobile-install v1 when deploying to Android 9 Pie devices.

  • Fixed issue where error messages from Android manifest merging actions were not fully propagated.

  • New incompatible change flag --incompatible_use_aapt2_by_default for defaulting to aapt2 in Android builds has been added. To build with aapt2 today, pass the flag --incompatible_use_aapt2_by_default=true or --android_aapt=aapt2, or set the aapt_version to aapt2 on your android_binary or android_local_test target.

  • Fixed mobile-install v1 error when installing an app with native libraries onto an Android 9 (Pie) device. See

  • Fixed a mobile-install bug where arm64-v8a libraries were not deployed correctly on arm64 devices. This was done by enabling incremental native lib deployment by default. A previously undocumented --android_incremental_native_libs flag is removed, and is now the regular behavior. See


  • The objc_bundle rule has been removed. Please migrate to rules_apple's applebundleimport.

  • The apple_stub_binary rule has been deleted.

  • The --xbinary_fdo option that passes xbinary profiles has been added.


  • cc_toolchain.(static|dynamic)_runtime_libs attributes are now optional


  • in tools/build_defs/pkg now supports a JSON manifest that can be used to add paths that have symbols that can't be specified via the command line


  • Filtering of inputs, outputs, and mnemonic filtering have been added to aquery.

  • The aquery and cquery query2 tests have been open-sourced.

  • The Bazel query how-to recommends ":*" instead of ":all", because "all" might be the name of a target.


  • The --runs_per_test has been placed in the TESTING documentation category.

  • A a clarifying message has been added to test case summary output when all test cases pass but the target fails.


This release contains contributions from many people at Google, as well as Benjamin Peterson, Dave Lee, George Gensure, Gert van Dijk, Gustavo Storti Salibi, Keith Smiley, Loo Rong Jie, Lukasz Tekieli, Mikhail Mazurskiy, Thi, Travis Cline, Vladimir Chebotarev, and Yannic.