Merge branch 'stable-2.15'

* stable-2.15:
  Fix dependency management for tests

Change-Id: Ic357778c1eefc7465b5dbd9fe4de0c8674182b18
diff --git a/BUILD b/BUILD
index da25867..0fc22f1 100644
--- a/BUILD
+++ b/BUILD
@@ -23,9 +23,19 @@
 
 junit_tests(
     name = "its_phabricator_tests",
+    testonly = 1,
     srcs = glob(["src/test/java/**/*.java"]),
     tags = ["its-phabricator"],
-    deps = PLUGIN_DEPS + PLUGIN_TEST_DEPS + [
+    deps = [
+        ":its-phabricator__plugin_test_deps",
+    ],
+)
+
+java_library(
+    name = "its-phabricator__plugin_test_deps",
+    testonly = 1,
+    visibility = ["//visibility:public"],
+    exports = PLUGIN_DEPS + PLUGIN_TEST_DEPS + [
         ":its-phabricator__plugin",
         "//plugins/its-base:its-base",
         "//plugins/its-base:its-base_tests-utils",