8 Commits

Author SHA1 Message Date
David Ostrovsky
fdbfcad77d Remove Buck based build
Bug: Issue 5302
Change-Id: I6e860446ef30ff0ad1c7c49fc0e39d39d921820b
2017-01-23 12:44:58 +00:00
David Ostrovsky
fa18907d7f Bazel: Reformat build files
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
2016-12-07 11:33:07 +00:00
Yuxuan 'fishy' Wang
75b98f77d9 bazel: add license to appropriate lib/ targets
This is to prepare for implementing genlicenses rule in bazel.

Change-Id: I60d79d5b53f9dd05c9f9ebfe6e6f658604c5a037
2016-09-26 16:42:38 +08:00
Patrick Hiesel
3ef6bc7f99 Establish library compliance for powermock and its dependencies
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
2016-09-19 15:08:06 +00:00
David Ostrovsky
b81b4f75ae Implement Bazel build
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
2016-06-14 21:12:02 +02:00
David Pursehouse
c17372bb8c Upgrade powermock to 1.6.4 and easymock to 3.4
Also upgrade objenesis to 2.2 as a dependency of easymock.

Change-Id: I3d95c034e0ba06c0ee5fabd42b6279764269bb20
2016-04-07 16:11:40 +00:00
Christian Aistleitner
c5f6b665a0 Bump to powermock 1.6.2 and to compatible easymock 3.3.1
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
2015-06-09 02:12:45 +00:00
David Pursehouse
1a9d928a1e Move powermock and easymock library definitions to separate BUCK files
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
2014-06-30 15:35:13 +00:00