Add support for Bazel in Gerrit tree build

Change-Id: I1f10c22fc085ad3b17d88ba14a5127c3b2677adc
diff --git a/BUILD b/BUILD
new file mode 100644
index 0000000..b136b56
--- /dev/null
+++ b/BUILD
@@ -0,0 +1,11 @@
+load("//tools/bzl:plugin.bzl", "gerrit_plugin")
+
+gerrit_plugin(
+    name = "egit",
+    srcs = glob(["src/main/java/**/*.java"]),
+    resources = glob(["src/main/resources/**/*"]),
+    manifest_entries = [
+        "Gerrit-PluginName: egit",
+        "Gerrit-Module: com.googlesource.gerrit.plugins.egit.Module",
+    ],
+)
diff --git a/src/main/resources/Documentation/build.md b/src/main/resources/Documentation/build.md
index 41180cb..eda36f8 100644
--- a/src/main/resources/Documentation/build.md
+++ b/src/main/resources/Documentation/build.md
@@ -1,21 +1,34 @@
 Build
 =====
 
-This plugin is built with Buck.
-Clone or link this plugin to the plugins directory of Gerrit tree
-and issue the command:
+This plugin is built using Bazel.
+Only the Gerrit in-tree build is supported.
+
+Clone or link this plugin to the plugins directory of Gerrit's source
+tree.
 
 ```
-  buck build plugins/egit
+  git clone https://gerrit.googlesource.com/gerrit
+  git clone https://gerrit.googlesource.com/plugins/@PLUGIN@
+  cd gerrit/plugins
+  ln -s ../../@PLUGIN@ .
+```
+
+From Gerrit source tree issue the command:
+
+```
+  bazel build plugins/@PLUGIN@
 ```
 
 The output is created in
 
 ```
-  buck-out/gen/plugins/egit/egit.jar
+  bazel-genfiles/plugins/@PLUGIN@/@PLUGIN@.jar
 ```
 
-This project can be imported into the Eclipse IDE:
+This project can be imported into the Eclipse IDE.
+Add the plugin name to the `CUSTOM_PLUGINS` set in
+Gerrit core in `tools/bzl/plugins.bzl`, and execute:
 
 ```
   ./tools/eclipse/project.py
@@ -31,4 +44,4 @@
 
 When building with Maven, the Gerrit Plugin API must be available.
 How to build the Gerrit Plugin API is described in the [Gerrit
-documentation](../../../Documentation/dev-buck.html#_extension_and_plugin_api_jar_files).
+documentation](../../../Documentation/dev-bazel.html#_extension_and_plugin_api_jar_files).