Merge branch 'stable-2.14'

* stable-2.14:
  Allow using target_suffix when building plugin

Change-Id: I25ca1ca7879ab6a11b34cf8b85989a35443147d1
diff --git a/gerrit_plugin.bzl b/gerrit_plugin.bzl
index c3d5fe5..04fb20b 100644
--- a/gerrit_plugin.bzl
+++ b/gerrit_plugin.bzl
@@ -27,6 +27,7 @@
     gwt_module = [],
     resources = [],
     manifest_entries = [],
+    target_suffix = "",
     **kwargs):
 
   gwt_deps = []
@@ -86,7 +87,7 @@
   # TODO(davido): Remove manual merge of manifest file when this feature
   # request is implemented: https://github.com/bazelbuild/bazel/issues/2009
   genrule2(
-    name = name,
+    name = name + target_suffix,
     stamp = 1,
     srcs = ['%s__non_stamped_deploy.jar' % name],
     cmd = " && ".join([
@@ -95,6 +96,6 @@
       "unzip -q $$ROOT/$<",
       "echo \"Implementation-Version: $$GEN_VERSION\n$$(cat META-INF/MANIFEST.MF)\" > META-INF/MANIFEST.MF",
       "zip -qr $$ROOT/$@ ."]),
-    outs = ['%s.jar' % name],
+    outs = ['%s%s.jar' % (name, target_suffix)],
     visibility = ['//visibility:public'],
   )