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
There are no significant differences between 1.6.4 and 1.6.1 [0] so it
is easy for us to downgrade. Google has a one version policy for all
libraries. I've tried to upgrade the internal version of
powermock/easymock, but unfortunately it is used very widely and
1.6.4 has made some API changes that break a lot of builds. As there is
no real difference in those version for the use within Gerrit, it is
easier to downgrade to 1.6.1 as there are no real drawbacks for us.
[0] https://github.com/jayway/powermock/blob/master/changelog.txt
Change-Id: I1c16ff474b5730389ab20bad47eae781841369d6
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
We were at powermock 1.5 and easymock 3.2. However, powermock 1.5
requires easymock 3.1. This mismatch in easymock versions caused tests
for plugins to fail with
org.powermock.reflect.exceptions.FieldNotFoundException: No instance
field of type "org.easymock.internal.MocksControl$MockType" could be
found in the class hierarchy of org.easymock.internal.MocksControl.
For example its-phabricator worked around it by providing and forcing
easymock 3.1. In order to be able to get rid of such workarounds, we
bump to powermock 1.6.2 and easymock 3.3.1, which are compatible
versions again.
Although easymock requires to bump objenesis only to 1.3, we
nonetheless bump it objenesis to 2.1 as powermock 1.6.2 requires
objenesis 2.1.
Change-Id: Ie61f51b937b8753f933b66d61f62c174b51c5ea6
Move the definitions to a separate file, thus making the lib/BUCK file
smaller.
Add a VERSION definition for powermock and reuse it for all the libary
declarations, rather than hard-coding the same version string every
time.
Depends-On: I695efcfabe67416104b0efb71f090a5303393702
Change-Id: I8840ef29d9ddfa241740fb0e4c4715c52ff07e30