Merge branch 'stable-2.13'

* stable-2.13:
  Reindex the change after forcing patchset as draft

Change-Id: Ic17e5417eb21b083d4dcc840643ea7199f59c3e1
diff --git a/.buckconfig b/.buckconfig
deleted file mode 100644
index 42b08db..0000000
--- a/.buckconfig
+++ /dev/null
@@ -1,14 +0,0 @@
-[alias]
-  force-draft = //:force-draft
-  plugin = //:force-draft
-
-[java]
-  src_roots = java, resources
-
-[project]
-  ignore = .git, eclipse-out
-
-[cache]
-  mode = dir
-  dir = buck-out/cache
-
diff --git a/BUCK b/BUCK
deleted file mode 100644
index 3af58c7..0000000
--- a/BUCK
+++ /dev/null
@@ -1,18 +0,0 @@
-include_defs('//bucklets/gerrit_plugin.bucklet')
-
-gerrit_plugin(
-  name = 'force-draft',
-  srcs = glob(['src/main/java/**/*.java']),
-  resources = glob(['src/main/resources/**/*']),
-  manifest_entries = [
-    'Gerrit-PluginName: force-draft',
-    'Gerrit-SshModule: com.googlesource.gerrit.plugins.forcedraft.ForceDraftSshModule',
-    'Implementation-Title: Force draft plugin',
-    'Implementation-URL: https://gerrit-review.googlesource.com/#/admin/projects/plugins/force-draft',
-  ]
-)
-
-java_library(
-  name = 'classpath',
-  deps = GERRIT_PLUGIN_API + [':force-draft__plugin'],
-)
diff --git a/BUILD b/BUILD
new file mode 100644
index 0000000..e2a3f62
--- /dev/null
+++ b/BUILD
@@ -0,0 +1,13 @@
+load("//tools/bzl:plugin.bzl", "gerrit_plugin")
+
+gerrit_plugin(
+    name = "force-draft",
+    srcs = glob(["src/main/java/**/*.java"]),
+    resources = glob(["src/main/resources/**/*"]),
+    manifest_entries = [
+        "Gerrit-PluginName: force-draft",
+        "Gerrit-SshModule: com.googlesource.gerrit.plugins.forcedraft.ForceDraftSshModule",
+        "Implementation-Title: Force draft plugin",
+        "Implementation-URL: https://gerrit-review.googlesource.com/#/admin/projects/plugins/force-draft",
+    ],
+)
diff --git a/lib/gerrit/BUCK b/lib/gerrit/BUCK
deleted file mode 100644
index 3a25946..0000000
--- a/lib/gerrit/BUCK
+++ /dev/null
@@ -1,14 +0,0 @@
-include_defs('//bucklets/maven_jar.bucklet')
-
-VER = '2.13'
-REPO = MAVEN_CENTRAL
-
-maven_jar(
-  name = 'plugin-api',
-  id = 'com.google.gerrit:gerrit-plugin-api:' + VER,
-  sha1 = 'e25d55b8f41627c4ae6b9d2069ec398638b219a3',
-  license = 'Apache2.0',
-  attach_source = False,
-  repository = REPO,
-)
-
diff --git a/src/main/resources/Documentation/build.md b/src/main/resources/Documentation/build.md
index 1086a18..8c82608 100644
--- a/src/main/resources/Documentation/build.md
+++ b/src/main/resources/Documentation/build.md
@@ -1,74 +1,34 @@
 Build
 =====
 
-This @PLUGIN@ plugin is built with Buck.
-
-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.
-
-#### Build standalone
-
-Clone bucklets library:
-
-```
-  git clone https://gerrit.googlesource.com/bucklets
-
-```
-and link it to @PLUGIN@ plugin directory:
-
-```
-  cd @PLUGIN@ && ln -s ../bucklets .
-```
-
-Add link to the .buckversion file:
-
-```
-  cd @PLUGIN@ && ln -s bucklets/buckversion .buckversion
-```
-
-Add link to the .watchmanconfig file:
-
-```
-  cd @PLUGIN@ && ln -s bucklets/watchmanconfig .watchmanconfig
-```
-
-To build the plugin, issue the following command:
-
-```
-  buck build plugin
-```
-
-The output is created in
-
-```
-  buck-out/gen/@PLUGIN@.jar
-```
-
-This project can be imported into the Eclipse IDE:
-
-```
-  ./bucklets/tools/eclipse.py
-```
-
-#### Build in Gerrit tree
+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, and issue the command:
+tree.
 
 ```
-  buck build plugins/@PLUGIN@
+  git clone https://gerrit.googlesource.com/gerrit
+  git clone https://gerrit.googlesource.com/plugins/@PLUGIN@
+  cd gerrit/plugins
+  ln -s ../../@PLUGIN@ .
 ```
 
-in the root of Gerrit's source tree to build
+From Gerrit source tree issue the command:
+
+```
+  bazel build plugins/@PLUGIN@
+```
 
 The output is created in
 
 ```
-  buck-out/gen/plugins/@PLUGIN@/@PLUGIN@.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