Add support for Bazel in Gerrit tree build
Change-Id: I859ef40aca193538d74cd83e7cc0d765f522314d
diff --git a/BUILD b/BUILD
new file mode 100644
index 0000000..d3014d0
--- /dev/null
+++ b/BUILD
@@ -0,0 +1,13 @@
+load("//tools/bzl:plugin.bzl", "gerrit_plugin")
+
+gerrit_plugin(
+ name = "menuextender",
+ srcs = glob(["src/main/java/**/*.java"]),
+ resources = glob(["src/main/**/*"]),
+ gwt_module = "com.googlesource.gerrit.plugins.menuextender.MenuExtenderPlugin",
+ manifest_entries = [
+ "Gerrit-PluginName: menuextender",
+ "Gerrit-Module: com.googlesource.gerrit.plugins.menuextender.Module",
+ "Gerrit-HttpModule: com.googlesource.gerrit.plugins.menuextender.HttpModule",
+ ],
+)
diff --git a/src/main/resources/Documentation/build.md b/src/main/resources/Documentation/build.md
index 76890aa..d98cc31 100644
--- a/src/main/resources/Documentation/build.md
+++ b/src/main/resources/Documentation/build.md
@@ -1,21 +1,23 @@
Build
=====
-This plugin is built with Buck.
+This plugin is built with Bazel.
Clone or link this plugin to the plugins directory of Gerrit tree
and issue the command:
```
- buck build plugins/menuextender
+ bazel build plugins/@PLUGIN@
```
The output is created in
```
- buck-out/gen/plugins/menuextender/menuextender.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