Compatible with Android Studio
Jan 29, 2019
10 344
Bazel support for Android Studio. Features:
  • Import BUILD files into the IDE.
  • BUILD file custom language support.
  • Support for Bazel run configurations for certain rule classes.
Usage instructions at

Recent change notes



* Add coverage support

* Fix kotlin library rule handling



* Fast Run now supports TikTok tests.

* Compilation errors during Fast Run show up in the Bazel Problems view and can be double-clicked to

navigate to the error in the source

* Go: fix some spurious 'unused symbol' warnings



* Fix failed test case gutter icons not displaying.

* Fix attaching source jars from external workspaces

* Fast run detects changed files more quickly and no longer unnecessarily compiles unchanged files.



* Resolve short-form references to external workspace targets

* Changed serialization scheme for faster read/write and reduced disk usage.



* Bug fixes and internal cleanup.



* Support auto-syncing on proto file changes (Bazel Settings > Automatically re-sync when proto files change)



* Bug fixes and internal cleanup.



* Bug fixes and internal cleanup.



* Added a 'test_flags' project view section, used for all 'bazel test' invocations.



* Bug fixes and internal cleanup.



* Bug fixes and internal cleanup.



* New UI for running fast builds: use the "Fast Run" and "Fast Debug" buttons (instead of the normal "Run" and "Debug").

For more info see

* TypeScript: add support for navigating to JavaScript symbols.

* BUILD/Skylark: change default indentation options to match buildifier.



* Bug fixes and internal cleanup.



* Run iterative tests faster using javac to compile instead of Bazel.

For instructions and caveats, see



* Bug fixes and internal cleanup.



* Bug fixes and internal cleanup.



* Bug fixes and internal cleanup.



* Add an 'add source to project' action



* Convert to/from workspace-relative paths when sharing run configurations

* Linkify parsed errors in the Bazel Console view

* Add next/previous error actions to the Bazel Console view



* Bug fixes and internal cleanup.



* Bug fixes and internal cleanup.



* Copy BUILD target string action now works from any project file.



* Scala: Fix navigating to generated source files.



* CLion: reduce freezes after large number of files change (e.g. after 'git pull') by reindexing changed files

* Be able to navigate from problems view to error line on bazel console.



* Scala: Add run configuration support for specs2 tests.



* Reduce indexing time after syncing.

* Java debugging: allow specifying a different debug port.

* Support custom environment variables when debugging python and C++ targets.

* Bazel plugin settings are now searchable.



* Go support: Better Bazel-specific support for Go import resolution.

* Suppress test failures showing up in the 'Problems' view



* CLion: improve performance of the 'Navigate > Related Symbol' action.

* CLion: resolve file paths in run configuration console.

* ASwB: add Python support (for AS 3.0+).

* Fix resolution of python import statements.



* Support 'Run with Coverage' for all Bazel test run configurations.

* Go-lang: Greatly improved import resolution.

* Go-lang: Add Bazel run configuration support.

* CLion: limit freezes when navigating between .cc and .h files.

* Add support for java_lite_proto_library.



* Support HotSwapping when debugging java_binary targets.

* Add an 'Update Directories' sync action, to add directories to the project

without running Bazel (note: new directories won't properly resolve until

a full sync is run).

* JavaScript: reduce hangs while editing, by prefetching all indexed JS files

during sync.

* Suppress spurious 'never assigned' warnings for @Inject-annotated fields.

* Add basic support for custom java rules, providing the 'java_common' skylark


* Python: prioritize project files over SDK packages when resolving imports.



* Bug fixes and internal cleanup.



* CLion test output: make URLs and bazel targets clickable

* Retrieve Javadocs for unattached sources

* CLion: incremental sync retains more caches. Prefill caches on project reload.



* Fix spurious 'unused' warnings for AutoFactory-annotated classes

* Python: Test UI support for paramaterized python tests

* Python: Linkify stack traces in Bazel Console view

* Test UI: fix timeouts not being marked as failures

* Go: migrate Go code to the latest JetBrains plugin



* Add a user setting to suppress the Bazel console during sync

* Add support for IntelliJ 2017.1.5

* ASwB: fix generated resources not resolving

* Fix unresolved references when targets are built with multiple Bazel configurations

* Python: fix 'argument list too long' errors when debugging



* Explicitly deprioritize older android/gwt-specific versions of libraries during sync

* Improve test finder heuristics when creating run configurations



* CLwB: Show "unsynced" diagnostic file status for C++ files



* Improve performance when indexing proto_library targets in the working set.

* Fix incorrectly reusing existing, but different, run configurations.

* Order BUILD file structure view by target name, not rule type.



* Add Scala support to IntelliJ.

* Add 'sync_flags' .bazelproject section, for flags only applied during sync.

* Android Studio: NDK plugins are now optional.

* CLion: Improve performance by prefetching required genfiles during sync.



* TypeScript: Support multiple ts_config rules in .bazelproject

* Android Studio: Index javac jar for javax.lang classes

* Show failed test targets in test result UI



* Add Python support to CLion

* Fix some bazel targets not being linkified in the run configuration console


* Add an action to open a workspace file outside your project (File > Open

Workspace File...)

* Add an action to add a source directory to your bazel project (Bazel >

Project > Add Directory To Project...)

* CLion: fix project directories being cleared when reopening a project



* Add support for IntelliJ 2017.1

* Support bazel build sharding for large projects

* Detect out-of-memory errors during sync, and suggest enabling sharding

* Add documentation links for .bazelproject items



* Add python support for IntelliJ

* Prefetch project files on project open, prior to initial indexing

* Handle nested junit test classes



* Bazel: WORKSPACE file language integration (syntax highlighting, navigation,


* Bazel: Find usages, navigation support for external workspace labels

* Expand macros in run configuration build flags



* Add CLion support

* Run configuration support for abstract test classes/methods

* Support running all test classes in a directory

* BUILD support: don't suggest private symbols in 'load' statement autocomplete



* Test UI support for parameterized tests

* Test UI support for sharded tests, run locally

* BUILD: Fix navigation for overridden built-in symbols

* BUILD: Add auto-complete for fully-qualified class names



* Integrate bazel test results with the IDE's test runner UI.

* Add support for sharing run configurations

* Restructure Bazel menu items



* Create source roots for all directories matching 'test_sources'.

* When viewing source files for supported but inactive languages, suggest

enabling support for that language.

* BUILD: Add syntax highlight/autocomplete support for more built-in functions.

* Fix java debugger connection timeout

* Basic support for Go-lang projects



* BUILD files: add syntax hightlighting for built-in names

* BUILD files: support aliased load statements

* ASwB: enable NDK support



* Add autocomplete in run configuration target editor.

* Fix debugging of java_binary targets with args



* Completely suppress JUnit for Bazel projects, removing a common source of


* Improve sync working set / partial sync to include more targets that

users might expect should be included.

* Add more history to import wizard.



* Compatibility with 2016.2.4

* Improve create run configuration from scratch experience



* Better tolerance of broken BUILD files during sync

* Sync working set action -- sync only the files you're

working on.

* BUILD file support: performance improvements.

* Unified run configurations -- there is only one type,

the Bazel Command Run Configuration.

* Add test rule chooser heuristics, to support some common

test genrules.



* Add local jar cache to improve performance and robustness.

* Support filtered gen jars to allow mixed generated/non-

generated rules (requires bazel release to activate).

* Abbreviate generated run configuration names.

General usage instructions

Follow the instructions at to setup your project.