Also add dependency on Mockito, which is now exported in the
acceptance framework. There are several other plugins using
this dependency, so exporting it in the acceptance framework
will have the nice side effect that we no longer need to keep
updating them individually.
Also note that one of the other plugins that uses Mockito is
the webhooks plugin, which is also planned to be added as a
core plugin.
Feature: Issue 8863
Change-Id: I72c0694ec6fcbabc2ef030014268738aa69cb707
Introduce the CUSTOM_PLUGINS_TEST_DEPS in tools/bzl/plugins.bzl
that allow plugin with external test dependencies to be listed.
That way Eclipse classpath generation process can consider these
dependencies.
Because the plugin's own test rule need these dependencies, it
should expose java_library rule called: <plugin>__plugin_test_deps:
java_library(
name = "high-availability__plugin_test_deps",
visibility = ["//visibility:public"],
exports = [
"@byte-buddy//jar",
"@mockito//jar",
"@objenesis//jar",
"@wiremock//jar",
],
)
and re-use this rule in junit_tests rule, e.g.:
junit_tests(
name = "high_availability_tests",
[...]
deps = [
[...]
":high-availability__plugin_test_deps",
]
)
Bug: Issue 6351
Change-Id: I55b402fa6edb9f2506a91451d70e68d44d1a7762
1164e53283187b8a2a79052f5ea85471f6f0b6d4 (Allow to add custom core
plugins in release build, 2015-12-11) added an item CUSTOM to the buck
plugin rules to make it easier for people to add additional 'core'
plugins in a release build of a forked copy of Gerrit.
When that was ported to bazel, it included cookbook-plugin by mistake.
As a result, when someone runs
bazel build release
they get a copy of gerrit with the cookbook plugin included and
enabled, which is almost never what they wanted.
Fix it by making the default list of custom plugins an empty list again.
Change-Id: I9b1653046bd368b8ec5c1978a15bd675c5dd31e7