Add support for Bazel in Gerrit tree build

Change-Id: I45f2f9aca75ab25489d0259a5c7644d0cb26c9ea
diff --git a/BUILD b/BUILD
new file mode 100644
index 0000000..9b5c115
--- /dev/null
+++ b/BUILD
@@ -0,0 +1,13 @@
+load("//tools/bzl:plugin.bzl", "gerrit_plugin")
+
+gerrit_plugin(
+    name = "review-strategy",
+    srcs = glob(["src/main/java/**/*.java"]),
+    resources = glob(["src/main/**/*"]),
+    gwt_module = "com.googlesource.gerrit.plugins.reviewstrategy.ReviewStrategy",
+    manifest_entries = [
+        "Gerrit-PluginName: review-strategy",
+        "Gerrit-Module: com.googlesource.gerrit.plugins.reviewstrategy.Module",
+        "Gerrit-HttpModule: com.googlesource.gerrit.plugins.reviewstrategy.HttpModule",
+    ],
+)
diff --git a/src/main/resources/Documentation/build.md b/src/main/resources/Documentation/build.md
index c00a9d0..57f0c81 100644
--- a/src/main/resources/Documentation/build.md
+++ b/src/main/resources/Documentation/build.md
@@ -1,68 +1,36 @@
 Build
 =====
 
-This plugin can be built with Buck or Maven.
+This plugin is built with Bazel.
 
-Buck
-----
+Clone (or link) this plugin to the `plugins` directory of Gerrit's source tree.
 
-Two build modes are supported: Standalone and in Gerrit tree.
-The standalone build mode is recommended, as this mode doesn't require
-the Gerrit tree to exist locally.
-
-
-
-Clone bucklets library:
+Put the external dependency Bazel build file into the Gerrit /plugins directory,
+replacing the existing empty one.
 
 ```
-  git clone https://gerrit.googlesource.com/bucklets
-
-```
-and link it to @PLUGIN@ plugin directory:
-
-```
-  cd @PLUGIN@ && ln -s ../bucklets .
+  cd gerrit/plugins
+  rm external_plugin_deps.bzl
+  ln -s @PLUGIN@/external_plugin_deps.bzl .
 ```
 
-Add link to the .buckversion file:
+Then issue
 
 ```
-  cd @PLUGIN@ && ln -s bucklets/buckversion .buckversion
+  bazel build plugins/@PLUGIN@
 ```
 
-Add link to the .watchmanconfig file:
-```
-  cd @PLUGIN@ && ln -s bucklets/watchmanconfig .watchmanconfig
-```
-
-To build the plugin, issue the following command:
-
-
-```
-  buck build plugin
-```
+in the root of Gerrit's source tree to build
 
 The output is created in
 
 ```
-  buck-out/gen/@PLUGIN@.jar
+  bazel-genfiles/plugins/@PLUGIN@/@PLUGIN@.jar
 ```
 
-
-Clone or link this plugin to the plugins directory of Gerrit's source
-tree, and issue the command:
-
-```
-  buck build plugins/@PLUGIN@
-```
-
-The output is created in
-
-```
-  buck-out/gen/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