Remove Buck based build

Change-Id: Iaa8fc09ffab1f55c73a1aec8d810ce848de38f56
diff --git a/.buckconfig b/.buckconfig
deleted file mode 100644
index daef711..0000000
--- a/.buckconfig
+++ /dev/null
@@ -1,16 +0,0 @@
-[alias]
-  cookbook = //:cookbook-plugin
-  plugin = //:cookbook-plugin
-
-[java]
-  src_roots = java, resources
-  source_level = 8
-  target_level = 8
-
-[project]
-  ignore = .git
-
-[cache]
-  mode = dir
-  dir = buck-out/cache
-
diff --git a/.gitignore b/.gitignore
index f69c160..16a6bd7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,5 @@
 /target
-/.buckversion
 /.classpath
 /.settings
 /.project
-/.buckd
-/buck-cache
-/buck-out
-/bucklets
 *.iml
diff --git a/BUCK b/BUCK
deleted file mode 100644
index 547d0e8..0000000
--- a/BUCK
+++ /dev/null
@@ -1,35 +0,0 @@
-include_defs('//bucklets/gerrit_plugin.bucklet')
-
-MODULE = 'com.googlesource.gerrit.plugins.cookbook.HelloForm'
-
-gerrit_plugin(
-  name = 'cookbook-plugin',
-  srcs = glob(['src/main/java/**/*.java']),
-  resources = glob(['src/main/**/*']),
-  gwt_module = MODULE,
-  manifest_entries = [
-    'Gerrit-PluginName: cookbook',
-    'Gerrit-Module: com.googlesource.gerrit.plugins.cookbook.Module',
-    'Gerrit-HttpModule: com.googlesource.gerrit.plugins.cookbook.HttpModule',
-    'Gerrit-SshModule: com.googlesource.gerrit.plugins.cookbook.SshModule',
-    'Implementation-Title: Cookbook plugin',
-    'Implementation-URL: https://gerrit-review.googlesource.com/#/admin/projects/plugins/cookbook-plugin',
-  ],
-)
-
-java_test(
-  name = 'cookbook_tests',
-  srcs = glob(['src/test/java/**/*IT.java']),
-  labels = ['cookbook-plugin'],
-  deps = GERRIT_PLUGIN_API + GERRIT_TESTS + [
-    ':cookbook-plugin__plugin',
-  ],
-)
-
-# TODO(davido): is this needed?
-# requires for bucklets/tools/eclipse/project.py to work
-# not sure, if this does something useful in standalone context
-java_library(
-  name = 'classpath',
-  deps = [':cookbook-plugin__plugin'],
-)
diff --git a/lib/BUCK b/lib/BUCK
deleted file mode 100644
index d333cba..0000000
--- a/lib/BUCK
+++ /dev/null
@@ -1,18 +0,0 @@
-include_defs('//bucklets/maven_jar.bucklet')
-
-maven_jar(
-  name = 'junit',
-  id = 'junit:junit:4.11',
-  sha1 = '4e031bb61df09069aeb2bffb4019e7a5034a4ee0',
-  license = 'DO_NOT_DISTRIBUTE',
-)
-
-maven_jar(
-  name = 'truth',
-  id = 'com.google.truth:truth:0.27',
-  sha1 = 'bd17774d2dc0fffa884d42c07d2537e86c67acd6',
-  license = 'DO_NOT_DISTRIBUTE',
-  exported_deps = [
-    ':junit',
-  ],
-)
diff --git a/lib/gerrit/BUCK b/lib/gerrit/BUCK
deleted file mode 100644
index 802c1b7..0000000
--- a/lib/gerrit/BUCK
+++ /dev/null
@@ -1,28 +0,0 @@
-include_defs('//bucklets/maven_jar.bucklet')
-
-VER = '2.14-SNAPSHOT'
-REPO = MAVEN_LOCAL
-
-maven_jar(
-  name = 'acceptance-framework',
-  id = 'com.google.gerrit:gerrit-acceptance-framework:' + VER,
-  license = 'Apache2.0',
-  attach_source = False,
-  repository = REPO,
-)
-
-maven_jar(
-  name = 'plugin-api',
-  id = 'com.google.gerrit:gerrit-plugin-api:' + VER,
-  license = 'Apache2.0',
-  attach_source = False,
-  repository = REPO,
-)
-
-maven_jar(
-  name = 'gwtui-api',
-  id = 'com.google.gerrit:gerrit-plugin-gwtui:' + VER,
-  license = 'Apache2.0',
-  attach_source = False,
-  repository = REPO,
-)
diff --git a/lib/gwt/BUCK b/lib/gwt/BUCK
deleted file mode 100644
index 26e55d3..0000000
--- a/lib/gwt/BUCK
+++ /dev/null
@@ -1,73 +0,0 @@
-include_defs('//bucklets/maven_jar.bucklet')
-
-VERSION = '2.8.0'
-
-maven_jar(
-  name = 'user',
-  id = 'com.google.gwt:gwt-user:' + VERSION,
-  sha1 = '518579870499e15531f454f35dca0772d7fa31f7',
-  license = 'Apache2.0',
-  attach_source = False,
-)
-
-maven_jar(
-  name = 'dev',
-  id = 'com.google.gwt:gwt-dev:' + VERSION,
-  sha1 = 'f160a61272c5ebe805cd2d3d3256ed3ecf14893f',
-  license = 'Apache2.0',
-  attach_source = False,
-)
-
-maven_jar(
-  name = 'javax-validation',
-  id = 'javax.validation:validation-api:1.0.0.GA',
-  bin_sha1 = 'b6bd7f9d78f6fdaa3c37dae18a4bd298915f328e',
-  src_sha1 = '7a561191db2203550fbfa40d534d4997624cd369',
-  license = 'Apache2.0',
-  visibility = ['PUBLIC'],
-)
-
-maven_jar(
-  name = 'jsinterop-annotations',
-  id = 'com.google.jsinterop:jsinterop-annotations:1.0.0',
-  bin_sha1 = '23c3a3c060ffe4817e67673cc8294e154b0a4a95',
-  src_sha1 = '5d7c478efbfccc191430d7c118d7bd2635e43750',
-  license = 'Apache2.0',
-  visibility = ['PUBLIC'],
-)
-
-maven_jar(
-  name = 'ant',
-  id = 'ant:ant:1.6.5',
-  bin_sha1 = '7d18faf23df1a5c3a43613952e0e8a182664564b',
-  src_sha1 = '9e0a847494563f35f9b02846a1c1eb4aa2ee5a9a',
-  license = 'Apache2.0',
-  visibility = ['PUBLIC'],
-)
-
-maven_jar(
-  name = 'colt',
-  id = 'colt:colt:1.2.0',
-  attach_source = False,
-  bin_sha1 = '0abc984f3adc760684d49e0f11ddf167ba516d4f',
-  license = 'DO_NOT_DISTRIBUTE',
-  visibility = ['PUBLIC'],
-)
-
-maven_jar(
-  name = 'tapestry',
-  id = 'tapestry:tapestry:4.0.2',
-  attach_source = False,
-  bin_sha1 = 'e855a807425d522e958cbce8697f21e9d679b1f7',
-  license = 'Apache2.0',
-  visibility = ['PUBLIC'],
-)
-
-maven_jar(
-  name = 'w3c-css-sac',
-  id = 'org.w3c.css:sac:1.3',
-  attach_source = False,
-  bin_sha1 = 'cdb2dcb4e22b83d6b32b93095f644c3462739e82',
-  license = 'DO_NOT_DISTRIBUTE',
-  visibility = ['PUBLIC'],
-)
diff --git a/lib/ow2/BUCK b/lib/ow2/BUCK
deleted file mode 100644
index 543bc09..0000000
--- a/lib/ow2/BUCK
+++ /dev/null
@@ -1,39 +0,0 @@
-include_defs('//bucklets/maven_jar.bucklet')
-
-VERSION = '5.1'
-
-maven_jar(
-  name = 'ow2-asm',
-  id = 'org.ow2.asm:asm:' + VERSION,
-  sha1 = '5ef31c4fe953b1fd00b8a88fa1d6820e8785bb45',
-  license = 'ow2',
-)
-
-maven_jar(
-  name = 'ow2-asm-analysis',
-  id = 'org.ow2.asm:asm-analysis:' + VERSION,
-  sha1 = '6d1bf8989fc7901f868bee3863c44f21aa63d110',
-  license = 'ow2',
-)
-
-maven_jar(
-  name = 'ow2-asm-commons',
-  id = 'org.ow2.asm:asm-commons:' + VERSION,
-  sha1 = '25d8a575034dd9cfcb375a39b5334f0ba9c8474e',
-  deps = [':ow2-asm-tree'],
-  license = 'ow2',
-)
-
-maven_jar(
-  name = 'ow2-asm-tree',
-  id = 'org.ow2.asm:asm-tree:' + VERSION,
-  sha1 = '87b38c12a0ea645791ead9d3e74ae5268d1d6c34',
-  license = 'ow2',
-)
-
-maven_jar(
-  name = 'ow2-asm-util',
-  id = 'org.ow2.asm:asm-util:' + VERSION,
-  sha1 = 'b60e33a6bd0d71831e0c249816d01e6c1dd90a47',
-  license = 'ow2',
-)
diff --git a/src/main/resources/Documentation/build.md b/src/main/resources/Documentation/build.md
index 2379943..4840880 100644
--- a/src/main/resources/Documentation/build.md
+++ b/src/main/resources/Documentation/build.md
@@ -1,65 +1,19 @@
 Build
 =====
 
-This plugin is built with Buck.
-
-Two build modes are supported: Standalone and in Gerrit tree. Standalone
-build mode is recommended, as this mode doesn't require local Gerrit
-tree to exist.
-
-Build standalone
-----------------
-
-Clone bucklets library:
-
-```
-  git clone https://gerrit.googlesource.com/bucklets
-
-```
-and link it to cookbook-plugin directory:
-
-```
-  cd cookbook-plugin && ln -s ../bucklets .
-```
-
-Add link to the .buckversion file:
-
-```
-  cd cookbook-plugin && ln -s bucklets/buckversion .buckversion
-```
-
-To build the plugin, issue the following command:
-
-```
-  buck build plugin
-```
-
-The output is created in
-
-```
-  buck-out/gen/cookbook-plugin/cookbook-plugin.jar
-```
-
-To execute the tests run:
-
-```
-  buck test
-```
-
-Build in Gerrit tree
---------------------
+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/cookbook-plugin
+  bazel build plugins/cookbook-plugin
 ```
 
 The output is created in
 
 ```
-  buck-out/gen/plugins/cookbook-plugin/cookbook-plugin.jar
+  bazel-genfiles/plugins/cookbook-plugin/cookbook-plugin.jar
 ```
 
 This project can be imported into the Eclipse IDE:
@@ -71,7 +25,13 @@
 To execute the tests run:
 
 ```
-  buck test --include cookbook-plugin
+  bazel test --test_tag_filters cookbook-plugin //...
+```
+
+or
+
+```
+  bazel test //plugins/cookbook-plugin:cookbook_tests
 ```
 
 Note that for compatibility reasons a Maven build is provided, but is considered