Expand docs on how to include external dependencies in core plugins
Per discussion on Ic0b01959 the process for including external dependencies was less than clear. Most plugins suggest overwriting core's external_plugin_deps.bzl with the plugin's version. This works until you want to add a second plugin or you expect your dependencies to automatically be picked up when building the release war. So instead suggest importing the dependencies! Change-Id: Iab7fe269b7d6ca6c499e5dc61fad7057e0a52725
This commit is contained in:
parent
9d79be2182
commit
6062b6599d
@ -121,11 +121,24 @@ CUSTOM_PLUGINS_TEST_DEPS = [
|
||||
]
|
||||
----
|
||||
|
||||
If the plugin(s) being bundled in the release have external dependencies, include them
|
||||
in `plugins/external_plugin_deps`. You should alias `external_plugin_deps()` so it
|
||||
can be imported for multiple plugins. For example:
|
||||
|
||||
----
|
||||
load(":my-plugin/external_plugin_deps.bzl", my_plugin="external_plugin_deps")
|
||||
load(":my-other-plugin/external_plugin_deps.bzl", my_other_plugin="external_plugin_deps")
|
||||
|
||||
def external_plugin_deps():
|
||||
my_plugin()
|
||||
my_other_plugin()
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
Since `tools/bzl/plugins.bzl` is part of Gerrit's source code and the version
|
||||
of the war is based on the state of the git repository that is built; you should
|
||||
commit this change before building, otherwise the version will be marked as
|
||||
'dirty'.
|
||||
Since `tools/bzl/plugins.bzl` and `plugins/external_plugin_deps.bzl` are part of
|
||||
Gerrit's source code and the version of the war is based on the state of the git
|
||||
repository that is built; you should commit this change before building, otherwise
|
||||
the version will be marked as 'dirty'.
|
||||
|
||||
== Bazel standalone driven
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user