Merge branch 'stable-2.16'

* stable-2.16:
  Upgrade Gerrit API to 2.16.5
  Upgrade Gerrit API to 2.15.10
  Set snapshot API to 2.16.5-SNAPSHOT
  Upgrade Gerrit API to 2.16.4
  Bazel: Replace PACKAGE_NAME constant with package_name() function
  Upgrade Gerrit API to 2.15.9
  Upgrade Gerrit API to 2.15.8
  Update Gerrit API to 2.14.18
  Upgrade Gerrit API to 2.15.7
  Upgrade Bouncycastle to 1.60 to match 2.14.17
  Update Gerrit API to 2.14.17
  Upgrade Gerrit API to 2.15.6
  Upgrade Gerrit API to 2.14.16

Change-Id: Ib9cd7a7d5db4a700890cf92d15f84d096ef6feb5
diff --git a/gerrit_api.bzl b/gerrit_api.bzl
index 1f0bae3..1a12d54 100644
--- a/gerrit_api.bzl
+++ b/gerrit_api.bzl
@@ -5,7 +5,7 @@
 gerrit_api is rule for fetching Gerrit plugin API using Bazel.
 """
 
-VER = "2.16.2"
+VER = "2.16.5"
 
 def gerrit_api():
     bouncycastle_repos()
@@ -13,12 +13,12 @@
     maven_jar(
         name = "gerrit_plugin_api",
         artifact = "com.google.gerrit:gerrit-plugin-api:" + VER,
-        sha1 = "8957246a676741a3738e3eff7a42e442e8cc8a13",
+        sha1 = "d8d87281636b59be2509be07b33ba56e0d6c5c5d",
     )
     maven_jar(
         name = "gerrit_acceptance_framework",
         artifact = "com.google.gerrit:gerrit-acceptance-framework:" + VER,
-        sha1 = "09c73f0a6608056913754263d3c105e9ec1670b4",
+        sha1 = "9d113e2ca789e617ab3c2cb6e18c93dc506090b0",
     )
     native.bind(
         name = "gerrit-plugin-api",
diff --git a/tools/js.bzl b/tools/js.bzl
index 8b99f29..3e23d6a 100644
--- a/tools/js.bzl
+++ b/tools/js.bzl
@@ -426,7 +426,7 @@
 
 def bundle_assets(*args, **kwargs):
     """Combine html, js, css files and optionally split into js and html bundles."""
-    _bundle_rule(*args, pkg = PACKAGE_NAME, **kwargs)
+    _bundle_rule(*args, pkg = native.package_name(), **kwargs)
 
 def polygerrit_plugin(name, app, srcs = [], assets = None, **kwargs):
     """Bundles plugin dependencies for deployment.
@@ -447,7 +447,7 @@
         name = name + "_combined",
         app = app,
         srcs = srcs if app in srcs else srcs + [app],
-        pkg = PACKAGE_NAME,
+        pkg = native.package_name(),
         **kwargs
     )