Some plugins, most notably owners-plugin, depend on prolog:common rule.
Given that this rule transitively depends on gerrit-server:server rule,
and this rule depends on virtually whole gerrit build graph, the final
plugin artifact contains effectively the whole gerrit war file content.
To fix that we expose prolog:common in plugin API. Moreover, adjust
prolog_cafe_library to not transitively depend on prolog runtime
library. We can do it, because gerrit-server already depends on it, so
that it's included in gerrit war anyway.
This change allows the owners-plugin to de-duplicate its size from 45 MB
to 1.5 MB only.
Change-Id: I8d7198a911c2da444c1822509988eda7d369af77
* stable-2.14:
Add new maintainers to developers section in pom.xml files
Update Version to 2.14-rc0
Change-Id: Ib620c5f49ec5dee1a838c082f74b785689edba71
commons-lang is already exposed in the plugin API. Given that some
plugins depend on commons-lang3, expose it too, to make building
the plugins against it easier.
Change-Id: I16e2dda225738b24489da810f43d8148af39acbf
This allows plugins to support in tree Gerrit build.
Reported-By: Hugo Arès <hugo.ares@ericsson.com>
Change-Id: Ice25958041d4fb455f75bb3d63f62e08934c9ae6
Reformat the Bazel build files with the buildifier tool [1].
The style is different for Bazel files. Most notably, indentation level
is 4 spaces instead of 2, and " is used instead of '.
[1] https://github.com/bazelbuild/buildifier
Change-Id: I95c0c6f11b6d76572797853b4ebb5cee5ebd3c98
Currently too big files are published, because some unwanted transitive
dependencies are included in the final artifacts. That will be fixed in
follow-up change by using neverlink option in java_library rule or using
provided_deps attribute that will be addded in future releases of Bazel:
[1].
TEST PLAN:
$ VERBOSE=1 tools/maven/api.sh install bazel
$ VERBOSE=1 tools/maven/api.sh install buck
* [1] https://github.com/bazelbuild/bazel/issues/1402
Change-Id: Ie73d4ae34d96be7f97f6329c4c30c814f54688d5
In Ieb3666281 prolog compiler was exposed in the plugin API. Turns out
that same plugins also need prolog runtime. Add it as well to simplify
the build for those plugins.
Change-Id: I22b74b8c9c13d529d65cb664173d23d7430b50a4
I did not change the archetype version referred in the dev documentation
in case documentation need to be updated before 2.13.1 is released.
Change-Id: I5bef5050da4e5f1cbe46041a2ba605e8b192aa6e
Add javadoc rules for plugin API:
* gerrit-extension-api
* gerrit-plugin-api
* gerrit-acceptance-framework
Note that GWT UI is not covered by Bazel build yet, so that we cannot
offer gerrit-plugin-gwtui:plugin-gwtui-javadoc rule in this change.
TEST PLAN:
bazel build gerrit-acceptance-framework:acceptance-framework-javadoc
bazel build gerrit-extension-api:extension-api-javadoc
bazel build gerrit-plugin-api:plugin-api-javadoc
Change-Id: I60832752010118e33eb6a06529032d86f169ee44
To pubish to Maven Central, sources and javadoc artifacts must be
created. Bazel java_library and java_binary rules provide sources out
of the box. We need to combine single source artifacts (server, httpd
and sshd) in ueber JAR and use java_binary rule for it.
TEST PLAN:
bazel build gerrit-plugin-api:plugin-api-sources_deploy.jar
Change-Id: Iafb549b5d0c0b0d7749f301b1edbd48b167eea3b
javadoc accepts source archive and we need to create one anyway. So
instead of trying to use the sources in the tree and guess the root
project directory, just use the source archive. We extact the archive
in temporary directory to make javadoc work.
Change-Id: Ib605f6cdab4742a23789da8fbc9c963c83e5b6d9
This change lays the groundwork for migrating email templates from VTL
to Soy (Closure Templates). This change does not modify the existing
template system or how emails are constructed. Moreover, it makes the
Soy library available alongside the Velocity library.
With this change, the Soy library (along with its dependencies) is added
to //gerrit-server:server and //gerrit-plugin-api:lib. A new license
definition is included for ICU4J.
A Guice provider for SoyTofu objects (which work as factories for Soy
template renderers) is injected into EmailArguments similarly to
VelocityRuntimeProvider.java. For technical reasons, a Soy template is
included, but is not used at this time. It does, however, provide a
simple example for how the email templates may look soon.
Feature: Issue 4345
Change-Id: I9625de1d129c04770d2a2dcfd4967c2c2779a81c
If no manifest file is specified, Buck's java_binary() rule merges the
content of manifest files from the dependant JARs into output
META/MANIFEST.MF. Normally we wouldn't care that it ends up with a lot
of mess, but unfortunately, it breaks the plugin-api.jar, with sealed
package exception, so we do care.
This happens because we provide the same package in multiple JARs, e.g.
com.gerrit.server.project
is shipped with plugin-api.jar, obviously, but it happens that one file
Util.class, from the same package is shipped in the
gerrit-acceptance-framework.jar
artifact. Normally it doesn't matter, unless a JAR is defined as sealed
in which case security violation exception is thrown during unit tests
execution.
To rectify this, we use the combination of custom manifest_file
attribute of java_binary() rule and passing non documented option from
this issue: [1] to ask Buck to not merge manifest files from the
dependant JARs.
With this fix, plugin unit tests executions in standalone build mode
work again.
* [1] https://github.com/facebook/buck/issues/86
Change-Id: I7b7571c20dcf6b54210b73760eccc8e699e6f1f6
So it can be used in plugins without them having to define it
themselves (potentially with a different version).
Change-Id: Ibb15acdd75640cd18b21ad5ac5895fd164cebccd
* stable-2.12:
ChangeIT: Assert that submitting a change doesn't remove non-voting reviewers
Instead of deleting patch-set-approval set vote to zero
ChangeIT#commitFooters: Fix setup of test labels
CreateChangeIT: Fix flaky test
Add a testing method to set the clock step used by TimeUtil
Update issue tracker URL in documentation
Update issue tracker URL in POM files
Change-Id: I991be7faf90cd37a8d664a0c951fea4c14f94492
Some plugins depend on prolog, e.g. gerrit-owners plugin, so we make it
available for the in tree plugin build mode.
Change-Id: Ieb3666281d00f62a219c0870b67f65d0a9ed0f0e
To run the tests:
bazel test //...
To build the Gerrit plugin API, run:
bazel build gerrit-plugin-api:plugin-api_deploy.jar
To build the Gerrit extension API, run:
bazel build gerrit-extension-api:extension-api_deploy.jar
TODOs:
Licenses
Reduce visibility (all public for now)
Generate HTML Documentation
Core plugins
gerrit_plugin() rule to build plugins in tree and standalone modes
GWT UI (only gwt_module() skylark rule is provided, no gwt_binary())
PolyGerrit UI
WAR
Publish artifacts to Maven Central
Ask Bazel team to add Gerrit to their CI on ci.bazel.io
Contributed-By: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I9a86e670882a44a5c966579cdeb8ed79b1590de3
This will allow plugins to use the functionality without having
to explicitly declare a dependency.
Change-Id: I92aa3bb2e77deef433a7f1262d8ad5bda59dd83b