Bazel: Consume mockito library from plugin API
Since release 3.0.1, the mockito library (and its dependencies) is part
of the plugin API and thus should not be included anymore as custom
dependency.
Update bazlets to latest stable-3.0. However switch the plugin api from
release to snapshot until the above API change gets formally released.
Change-Id: I97918778c8786c2a9d807ec9b47dca639a643b22
diff --git a/BUILD b/BUILD
index 102ba27..d6818c7 100644
--- a/BUILD
+++ b/BUILD
@@ -23,7 +23,6 @@
visibility = ["//visibility:public"],
exports = PLUGIN_DEPS + PLUGIN_TEST_DEPS + [
":rate-limiter__plugin",
- "@mockito//jar",
],
)
diff --git a/WORKSPACE b/WORKSPACE
index a37fb69..2934588 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -3,28 +3,24 @@
load("//:bazlets.bzl", "load_bazlets")
load_bazlets(
- commit = "51049da0140c58ee26f8285bca4393c5e43ce4a1",
+ commit = "1d381f01c853e2c02ae35430a8e294e485635d62",
#local_path = "/home/<user>/projects/bazlets",
)
# Snapshot Plugin API
-#load(
-# "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl",
-# "gerrit_api_maven_local",
-#)
-
-# Load snapshot Plugin API
-#gerrit_api_maven_local()
-
-# Release Plugin API
load(
- "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl",
- "gerrit_api",
+ "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl",
+ "gerrit_api_maven_local",
)
+# Load snapshot Plugin API
+gerrit_api_maven_local()
+
+# Release Plugin API
+#load(
+# "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl",
+# "gerrit_api",
+#)
+
# Load release Plugin API
-gerrit_api()
-
-load("//:external_plugin_deps.bzl", "external_plugin_deps")
-
-external_plugin_deps()
+#gerrit_api()
diff --git a/external_plugin_deps.bzl b/external_plugin_deps.bzl
deleted file mode 100644
index 151b2fb..0000000
--- a/external_plugin_deps.bzl
+++ /dev/null
@@ -1,26 +0,0 @@
-load("//tools/bzl:maven_jar.bzl", "maven_jar")
-
-def external_plugin_deps():
- maven_jar(
- name = "mockito",
- artifact = "org.mockito:mockito-core:2.28.2",
- sha1 = "91110215a8cb9b77a46e045ee758f77d79167cc0",
- deps = [
- "@byte-buddy//jar",
- "@objenesis//jar",
- ],
- )
-
- BYTE_BUDDY_VERSION = "1.9.10"
-
- maven_jar(
- name = "byte-buddy",
- artifact = "net.bytebuddy:byte-buddy:" + BYTE_BUDDY_VERSION,
- sha1 = "211a2b4d3df1eeef2a6cacf78d74a1f725e7a840",
- )
-
- maven_jar(
- name = "objenesis",
- artifact = "org.objenesis:objenesis:2.6",
- sha1 = "639033469776fd37c08358c6b92a4761feb2af4b",
- )