Remove outstanding references to buck

Most references are in documentation and comments. The main
developer-visible behavior change is moving the downloaded artifact
cache from ~/.gerritcodereview/buck-cache to bazel-cache, which will
result in re-downloading dependencies on the next build; this had to
happen sooner or later. Alternatives, which are not worth the effort,
include teaching the scripts to accept both locations, or having it
rearrange and/or symlink directories behind the scenes.

There are just a few references remaining, all of which are intentional:

$ git grep -Pi '\bbuck(lets?)?\b' HEAD
HEAD:java/com/google/gerrit/httpd/raw/StaticModule.java:        // https://gerrit-review.googlesource.com/#/c/57570/57/gerrit-httpd/BUCK@32
HEAD:resources/com/google/gerrit/server/mime/mime-types.properties:bucklet = text/x-python
HEAD:resources/com/google/gerrit/server/mime/mime-types.properties:BUCK = text/x-python

Change-Id: Idb93a483451ccf86ba96c379d38008a7894c3f95
diff --git a/.gitignore b/.gitignore
index 0e954ce..5fdc85b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,7 +20,6 @@
 /.settings/org.maven.ide.eclipse.prefs
 /bazel-*
 /bin/
-/buck-out
 /eclipse-out
 /extras
 /gerrit-package-plugins
@@ -30,4 +29,4 @@
 /plugins/cookbook-plugin/
 /test_site
 /tools/format
-/.vscode
\ No newline at end of file
+/.vscode
diff --git a/Documentation/dev-bazel.txt b/Documentation/dev-bazel.txt
index b482de1..f6cdc06 100644
--- a/Documentation/dev-bazel.txt
+++ b/Documentation/dev-bazel.txt
@@ -363,18 +363,14 @@
 === Cleaning The download cache
 
 The cache for downloaded artifacts is located in
-`~/.gerritcodereview/buck-cache/downloaded-artifacts`.
+`~/.gerritcodereview/bazel-cache/downloaded-artifacts`.
 
 If you really do need to clean the download cache manually, then:
 
 ----
- rm -rf ~/.gerritcodereview/buck-cache/downloaded-artifacts
+ rm -rf ~/.gerritcodereview/bazel-cache/downloaded-artifacts
 ----
 
-[NOTE] When building with Bazel the artifacts are still cached in
-`~/.gerritcodereview/buck-cache/downloaded-artifacts`. This allows Bazel to
-make use of libraries that were previously downloaded by Buck.
-
 [[local-action-cache]]
 
 To accelerate builds, local action cache can be activated. Note, that this
diff --git a/Documentation/dev-release-subproject.txt b/Documentation/dev-release-subproject.txt
index fcafea5..4886849 100644
--- a/Documentation/dev-release-subproject.txt
+++ b/Documentation/dev-release-subproject.txt
@@ -32,7 +32,7 @@
 ----
 
 * Change the `id`, `bin_sha1`, and `src_sha1` values in the `maven_jar`
-for the subproject in `/lib/BUCK` to the `SNAPSHOT` version.
+for the subproject in `/WORKSPACE` to the `SNAPSHOT` version.
 +
 When Gerrit gets released, a release of the subproject has to be done
 and Gerrit has to reference the released subproject version.
diff --git a/java/com/google/gerrit/httpd/raw/StaticModule.java b/java/com/google/gerrit/httpd/raw/StaticModule.java
index e1c094c..2cdca13 100644
--- a/java/com/google/gerrit/httpd/raw/StaticModule.java
+++ b/java/com/google/gerrit/httpd/raw/StaticModule.java
@@ -457,7 +457,7 @@
       GuiceFilterRequestWrapper reqWrapper = new GuiceFilterRequestWrapper(req);
       String path = pathInfo(req);
 
-      // Special case assets during development that are built by Buck and not
+      // Special case assets during development that are built by Bazel and not
       // served out of the source tree.
       //
       // In the war case, these are either inlined by vulcanize, or live under
diff --git a/java/com/google/gerrit/launcher/GerritLauncher.java b/java/com/google/gerrit/launcher/GerritLauncher.java
index 618d754..e8892be 100644
--- a/java/com/google/gerrit/launcher/GerritLauncher.java
+++ b/java/com/google/gerrit/launcher/GerritLauncher.java
@@ -704,9 +704,7 @@
 
   private static boolean includeJar(URL u) {
     String path = u.getPath();
-    return path.endsWith(".jar")
-        && !path.endsWith("-src.jar")
-        && !path.contains("/buck-out/gen/lib/gwt/");
+    return path.endsWith(".jar") && !path.endsWith("-src.jar");
   }
 
   private GerritLauncher() {}
diff --git a/tools/bzl/gwt.bzl b/tools/bzl/gwt.bzl
index a733b0c..b09a608 100644
--- a/tools/bzl/gwt.bzl
+++ b/tools/bzl/gwt.bzl
@@ -12,8 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Port of Buck native gwt_binary() rule. See discussion in context of
-# https://github.com/facebook/buck/issues/109
 load("//tools/bzl:genrule2.bzl", "genrule2")
 load("//tools/bzl:java.bzl", "java_library2")
 
diff --git a/tools/download_file.py b/tools/download_file.py
index 1a32bbf..26671f0 100755
--- a/tools/download_file.py
+++ b/tools/download_file.py
@@ -25,8 +25,7 @@
 from zipfile import ZipFile, BadZipfile, LargeZipFile
 
 GERRIT_HOME = path.expanduser('~/.gerritcodereview')
-# TODO(davido): Rename in bazel-cache
-CACHE_DIR = path.join(GERRIT_HOME, 'buck-cache', 'downloaded-artifacts')
+CACHE_DIR = path.join(GERRIT_HOME, 'bazel-cache', 'downloaded-artifacts')
 LOCAL_PROPERTIES = 'local.properties'
 
 
diff --git a/tools/eclipse/project.py b/tools/eclipse/project.py
index 9f8b4b7..9374d88 100755
--- a/tools/eclipse/project.py
+++ b/tools/eclipse/project.py
@@ -13,7 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-# TODO(sop): Remove hack after Buck supports Eclipse
 
 from __future__ import print_function
 # TODO(davido): use Google style for importing instead:
diff --git a/tools/js/download_bower.py b/tools/js/download_bower.py
index 1c8d45e..3db39d5 100755
--- a/tools/js/download_bower.py
+++ b/tools/js/download_bower.py
@@ -26,7 +26,7 @@
 import bowerutil
 
 CACHE_DIR = os.path.expanduser(os.path.join(
-    '~', '.gerritcodereview', 'buck-cache', 'downloaded-artifacts'))
+    '~', '.gerritcodereview', 'bazel-cache', 'downloaded-artifacts'))
 
 
 def bower_cmd(bower, *args):