Add support for Bazel in Gerrit tree build

Change-Id: Ia6aaaa53c4827271091a45e6016ee67f3ea0036d
diff --git a/BUILD b/BUILD
new file mode 100644
index 0000000..a7d707a
--- /dev/null
+++ b/BUILD
@@ -0,0 +1,34 @@
+load("//tools/bzl:junit.bzl", "junit_tests")
+load(
+    "//tools/bzl:plugin.bzl",
+    "gerrit_plugin",
+    "PLUGIN_DEPS",
+    "PLUGIN_TEST_DEPS",
+)
+
+gerrit_plugin(
+    name = "its-storyboard",
+    srcs = glob(["src/main/java/**/*.java"]),
+    resources = glob(["src/main/**/*"]),
+    manifest_entries = [
+        "Gerrit-PluginName: its-storyboard",
+        "Gerrit-Module: com.googlesource.gerrit.plugins.its.storyboard.StoryboardModule",
+        "Gerrit-ReloadMode: reload",
+        "Implementation-Title: its-storyboard plugin",
+        "Implementation-URL: https://gerrit.googlesource.com/plugins/its-storyboard",
+    ],
+    deps = [
+        "//plugins/its-base",
+    ],
+)
+
+junit_tests(
+    name = "its_storyboard_tests",
+    srcs = glob(["src/test/java/**/*.java"]),
+    tags = ["its-storyboard"],
+    deps = PLUGIN_DEPS + PLUGIN_TEST_DEPS + [
+        ":its-storyboard__plugin",
+        "//plugins/its-base:its-base",
+        "//plugins/its-base:its-base_tests-utils",
+    ],
+)
diff --git a/src/main/resources/Documentation/build.md b/src/main/resources/Documentation/build.md
index dd7374b..ce45068 100644
--- a/src/main/resources/Documentation/build.md
+++ b/src/main/resources/Documentation/build.md
@@ -1,22 +1,24 @@
 Build
 =====
 
-This plugin is built with Buck.
+This plugin is built with Bazel.
 
 Clone or link this plugin to the plugins directory of Gerrit's source
 tree, and issue the command:
 
 ```
-  buck build plugins/its-storyboard
+  bazel build plugins/@PLUGIN@
 ```
 
 The output is created in
 
 ```
-  buck-out/gen/plugins/its-storyboard/its-storyboard.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
@@ -25,5 +27,5 @@
 To execute the tests run:
 
 ```
-  buck test --all --include its-storyboard
+  bazel test plugins/its-storyboard:its_storyboard_tests
 ```