48 Commits

Author SHA1 Message Date
David Pursehouse
791d19e0f4 Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Switch PatchListCache to using legacy cache backend
  Replace guava caches with caffeine

Add caffeine and caffeine-guava to Documentation/licenses.txt
which did not exist on earlier branches.

Change-Id: I40fb2798a8b6eda2e92e4409c1e57042a8e59ef4
2019-12-04 18:26:21 +09:00
David Ostrovsky
06c86046fe Replace guava caches with caffeine
Replacing Guava caches with Caffeine reduces the chances of having the
deadlocks and improves the cache performance.

This was already attempted in: I8d2b17a94d0, but got reverted in:
If65560b4a9b due to recursion in PatchListLoader. This recursion issue
is present on current master. While this change replaces all caches
with Caffeine backend, the follow-up change in this series will switch
back to using Guava backend for PatchListCache implementation.

For seamless integration, the caffeine-guava adapter library is used.
Given that the final artifact for the adapter is also called guava,
there is only the version number that differentiates that artifact from
the guava library itself so that we have a danger for naming collision.
To avoid potential naming collision risk, rename the library name to
caffeine-guava.jar during the fetch from Maven Central.

Alternatives considered is not to use the caffeine-guava adapter
library. But then the Cache and LoadingCache classes and friends would
change the package name from com.google.common.cache package to
com.github.benmanes.caffeine.cache package and this change would also
affect some gerrit plugins and thus considered to be a quite intrusive
change.  Still we can consider to do this change in one of the future
gerrit releases.

Bug: Issue 7645
Bug: Issue 11484
Change-Id: I6af4c15d6c15f438becd62409b7d233c309be8de
(cherry picked from commit 0050a9b5f61da67a9f33fda0bb170f8b1df6080a)
2019-12-04 01:19:23 +01:00
David Pursehouse
726b4cc796 Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Load proto_library from @rules_proto//proto:defs.bzl
  Update git submodules
  Bazel: Add fixes for --incompatible_load_{java|python}_rules_from_bzl
  Bazel: Bump minimum supported version to 0.29.0
  Lucene index configuration and docs.

Change-Id: I401c192096047dd5069be37f17c4a62a8ed3afb7
2019-09-05 08:17:48 +09:00
David Pursehouse
31c82401f0 Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Bazel: Add fixes for --incompatible_load_{java|python}_rules_from_bzl
  Bazel: Bump minimum supported version to 0.29.0
  Lucene index configuration and docs.

Change-Id: I6c597cbc89fafece83c374e9b36c4c4c0126704f
2019-09-04 16:35:55 +09:00
David Ostrovsky
20c2fd4f0b Bazel: Add fixes for --incompatible_load_{java|python}_rules_from_bzl
This change is fixing "All Java build rules should be loaded from
Starlark" warning flagged by latest buildifier version: [1]. Python
rules are now also loaded from the Starlark.

Also extract codemirror library import to BUILD file. This is needed to
avoid cycle in the workspace file, after importing java rules from
Starlark.

[1] https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#native-java

Change-Id: I36192c9465d988b25cf09c250e110f15850910cd
2019-09-02 00:42:25 +02:00
David Pursehouse
bc230a0ed1 Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Error Prone: Enable DateFormatConstant at ERROR severity
  Synchronize protobuf with version used in rules_closure
  Update rules_closure to latest version
  Upgrade elasticsearch-rest-client to 7.1.1

Change-Id: I00004567e675b67f498a2edfb93951a5aab140f5
2019-06-06 20:54:29 +09:00
David Pursehouse
aea3112aaf Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Synchronize protobuf with version used in rules_closure
  Update rules_closure to latest version
  Upgrade elasticsearch-rest-client to 7.1.1

Change-Id: If4cdcc44c53e90f3562bdff1b7a30dd09cd9764f
2019-06-06 20:53:27 +09:00
David Ostrovsky
51e6455546 Synchronize protobuf with version used in rules_closure
Avoid fetching a potentially different version of protobuf-java and use
version that rules_closure transitively depends on.

Change-Id: Ief63f06cb531cd76e2bcf8c5623d653a5c1b69c7
2019-06-02 11:02:44 +02:00
David Pursehouse
059866bf67 Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  lib: check that nongoogle.bzl doesn't grow new dependencies
  tools/nongoogle.bzl: separate out dependencies exempt from library compliance

Change-Id: Idd5113d6ecc312a67f5390541abe5de715ec2e9b
2019-05-12 12:32:08 +02:00
Han-Wen Nienhuys
8886849315 lib: check that nongoogle.bzl doesn't grow new dependencies
Change-Id: Ie5fbd18de68fca13f954ef4d05ea7acc7d9cfea9
2019-05-09 07:47:56 +02:00
David Ostrovsky
9f00a88cba Bazel: Remove unused derby dependency
Change-Id: Ia9dd6e8f60b18fb6769b20b45699249b489330ff
2019-05-07 00:50:21 +02:00
Dave Borowitz
c58702ac79 Copy gwtorm dependencies into core repo
This is the minimal set of files from gwtorm that are still needed by
Gerrit core. The long term plan is to migrate away from these, for
example by revamping our exception hierarchy (I9c8fac5f) and converting
the legacy mutable gwtorm-based types to immutable AutoValues.

In the short term, copying these files into core allows us to remove a
bunch of unused class files from the war, and prevents new dependencies
from creeping in. This change should be viewed as a starting point of
the larger project to eliminate gwtorm, not an end in itself.

Files copied from:
https://gerrit.googlesource.com/gwtorm/+/de62a8902ade3239e4a2db105bb24e4561e34df3

The whole gwtorm repo is under the same AOSP umbrella as Gerrit core, so
it's all under the same CLA and can be copied between repos on the
Gerrit hosts without any change to the license.

Change-Id: I0f09ed399180bc132fb0a28be07944b4aa9fe4a0
2019-04-09 10:41:45 +09:00
Dave Borowitz
1d23e19f87 Remove gwtjsonrpc library dependency
We no longer use GWT at all so this dep is not really appropriate. All
necessary code has been copied into Gerrit core.

Change-Id: I5e81f0c8fc37710101395301706bc7c3e09eeaec
2018-12-19 10:13:09 -08:00
Edwin Kempin
2f59d3ae25 Remove unused dependency on PostgreSQL
ReviewDb is gone and the PostgreSQL lib is no longer needed.

Note that there is a PostgreSQL implementation of
AccountPatchReviewStore but this implementation is based on JDBC and
doesn't use the PostgreSQL lib.

Change-Id: I72a65efc99abbc6baa7ffc7dabe62b312a30e84c
Signed-off-by: Edwin Kempin <ekempin@google.com>
2018-12-10 10:42:14 -08:00
David Pursehouse
bb3710002e Update guava to 27.0.1-jre
Since 27.0-jre guava has a runtime dependency on failureaccess. See the
release notes for 27.0 [1] and 27.0.1 [2] for further details.

[1] https://github.com/google/guava/releases/tag/v27.0
[2] https://github.com/google/guava/releases/tag/v27.0.1

Change-Id: Ie38027b9321926f8b054daba6a940cf476c33224
2018-11-29 07:09:54 +00:00
David Pursehouse
b0618f9b94 [CVE-2018-10237]: Upgrade guava to 24.1.1-jre
This upgrade fixes CVE-2018-10237 [1]:

  Unbounded memory allocation in Google Guava 11.0 through 24.x before
  24.1.1 allows remote attackers to conduct denial of service attacks
  against servers that depend on this library and deserialize attacker-
  provided data, because the AtomicDoubleArray class (when serialized
  with Java serialization) and the CompoundOrdering class (when
  serialized with GWT serialization) perform eager allocation without
  appropriate checks on what a client has sent and whether the data size
  is reasonable.

[1] https://nvd.nist.gov/vuln/detail/CVE-2018-10237

This also adds dependency on j2objc-annotations to prevent the following
warning during the build:

  INFO: From Building java/com/google/gerrit/lucene/liblucene.jar (12 source files):
  warning: unknown enum constant ReflectionSupport$Level.FULL
  reason: class file for com.google.j2objc.annotations.ReflectionSupport$Level not found

Bug: Issue 9952
Change-Id: Iea79ee7d93c4b7c85479b5ec01ee07e19beed611
2018-11-05 10:00:40 +09:00
David Ostrovsky
a84329bfa1 Bazel: Export j2objc in guava library to fix build warning
Bazel correctly emits warning when the classpath contains a reference to
com.google.j2objc.annotations.ReflectionSupport, which isn't on the
classpath:

  warning: unknown enum constant ReflectionSupport$Level.FULL
    reason: class file for com.google.j2objc.annotations.ReflectionSupport$Level not found

See this issue for more details: [1].

[1] https://github.com/bazelbuild/bazel/issues/6414

Bug: Issue 9779
Change-Id: I313549d5cb219cb144087dcdc85091f21faa6e94
2018-10-17 08:13:15 +02:00
Paladox none
54bd23bb4c Switch from pegdown to flexmark-java
The pegdown project is no longer maintained and has been deprecated
in favour of flexmark [1].  Furthermore, flexmark has more features
than pegdown and has better performance [2].

[1] https://github.com/sirthias/pegdown
[2] https://github.com/vsch/flexmark-java#feature-comparison

Change-Id: Ie3c20a7fffb0f6917bd3de353a9d7b46eeaa818f
2018-08-22 15:21:26 +00:00
Dave Borowitz
de3e936507 Add missing runtime_deps to gwtorm
Change-Id: I41c547837c8275eef563bea31711e9b5a0b72189
2018-08-07 08:51:12 -07:00
David Ostrovsky
e27a404a3e Bump args4j version to 2.0.29
There is pending upgrade for review for years now to version 2.33: [1],
that appears to be too introusive change. There are two issues:

* Collision with rules_closure's and closure-templates's args4j version
* Non trivial changes in gerrit core to adapt to newer args4j version

Dismantle those issues, by upgrading to intermediate version: 2.0.29.

Re-fetch args4j twice: one for rules_closure to work properly with
ancient args4j version, while renaming the internal one to the more
recent version: args4j-intern.

Needless to say, that we have uploaded these PRs to both projects:
rules_closure and closure-templates that were more or less rejected,
so that we don't hope that args4j is going to be upgraded upstream,
thus keeping this status quo of double fetching: [2],[3].

The reason we need this change is dependency of gitblit-plugin on more
recent version so that we are getting classpath collision. Another
alternative that was considered (but abandoned) is to downgrade args4j
version in gitblit to the same ancient version used by gerrit core.

[1] https://gerrit-review.googlesource.com/c/gerrit/+/67793
[2] https://github.com/bazelbuild/rules_closure/pull/262
[3] https://github.com/google/closure-templates/pull/155

Change-Id: I5ec6645b92d54fccc03a723b7b50c50a99393d57
2018-08-01 11:09:56 +02:00
David Ostrovsky
c3536a0650 Bump guice version to 4.2.0
The new version provides better support for Java 9 and improves
performance. Multibindings artifact is now included in the guice
core artifact. The full release notes is here: [1].

[1] https://github.com/google/guice/wiki/Guice42

Change-Id: I208d53ce1cf9b99ed8f03ae34470e95c3b8f71ce
(cherry picked from commit 1fa7774d237d0ea864b9f03b6551fd1ebef0c619)
2018-07-19 08:42:40 +09:00
David Pursehouse
fe0735cfaa Move commons-io from lib/BUILD to lib/commons/BUILD
All the commons-* libraries are defined in lib/commons/BUILD with
the exception of commons-io which is in lib/BUILD.

Move it to lib/commons/BUILD to make it consistent.

Change-Id: If2541eba2a4a9e9b5e7a777940bfce923478808b
2018-06-13 20:01:44 +09:00
David Ostrovsky
e1359a35e1 Bazel: Harmonize names of external repositories
Recent Bazel versions support dash character in external repository
names. Consistently use them with one exception: javax_inject. This is
needed to match the name in the rules_closure.

Change-Id: I1e75690fe1ee2ab32fffe07c0c30dbed84753960
2018-06-13 11:38:03 +09:00
David Ostrovsky
f98a60b35f Bazel: Harmonize names of external repositories
Recent Bazel versions support dash character in external repository
names. Consistently use them with one exception: javax_inject. This is
needed to match the name in the rules_closure.

Change-Id: I1e75690fe1ee2ab32fffe07c0c30dbed84753960
2018-06-08 19:33:01 +09:00
Dave Borowitz
94fd307693 Move Truth rules to a subdirectory of lib
The list of supported Truth extensions is only going to grow.

Change-Id: Ic67a9df6a7548d964fc10b13c10b6db1c96e514e
2018-05-16 14:20:06 -07:00
David Ostrovsky
1fa7774d23 Bump guice version to 4.2.0
The new version provides better support for Java 9 and improves
performance. Multibindings artifact in now included in the guice
core artifact. The full release notes is here: [1].

[1] https://github.com/google/guice/wiki/Guice42

Change-Id: I208d53ce1cf9b99ed8f03ae34470e95c3b8f71ce
2018-03-06 21:31:22 +00:00
Hugo Arès
b4cb044be9 Revert "Reduce chance of deadlock in account cache"
This reverts commit 00fc15ac0073b86270e7c0f40d386f95dfe31e86.

With Caffeine, accessing the cache from the cache loader is causing an
infinite loop [1]. Merging that change up to stable-2.15 exposed that
there is still at least one cache loader (PatchListLoader) accessing its
cache (PatchListCacheImpl).

The test going into an infinite loop on stable-2.15 is
RevisionDiffIT.rebaseHunksOneLineApartFromRegularHunkAreIdentified.

Revert the change until circular dependency is removed or a solution is
found to access the cache from the cache loader.

[1]https://github.com/ben-manes/caffeine/issues/89

Bug: Issue 8464
Change-Id: If65560b4a9bfcf0a03decaedd83ad000c6b28f4f
2018-02-27 21:26:11 -05:00
Hugo Arès
00fc15ac00 Reduce chance of deadlock in account cache
This deadlock is not the typical deadlock where 2 threads locked a
resource and each one is waiting to lock a second resource already
locked by the other thread. The thread owning the account cache lock is
parked, which tell us that the locked was not released. I could not
determine the exact sequence of events leading to this deadlock making
it really hard to report/fix the problem.

While investigating, I realized that there quite a few reported issues
in Guava that could be major for Gerrit:

  Our deadlock happening in account cache
  https://bugs.chromium.org/p/gerrit/issues/detail?id=7645

  Other deadlock
  https://github.com/google/guava/issues/2976
  https://github.com/google/guava/issues/2863

  Performance
  https://github.com/google/guava/issues/2063

  Race condition
  https://github.com/google/guava/issues/2971

Because I could not reproduce the deadlock in a dev environment or in
a unit test making it almost impossible to fix, I considered other
options such as replacing Guava by something else.

The maintainer of Caffeine[1] cache claims that Caffeine is a high
performance[2], near optimal caching library designed/implemented base
on the experience of designing Guava's cache and ConcurrentLinkedHashMap.
I also did some benchmarks about spawning a lot of threads reading/writing
values from the caches. I ran those benchmarks on both Guava and Caffeine
and Guava was always taking at least double the time than Caffeine to
complete all operations.

Migrating to Caffeine is almost a drop-in replacement. Caffeine
interface are very similar to Guava cache and there is an adapter to
migrate to Caffeine and keep using Guava's interfaces. After migrating
to Caffeine, we saw that deadlock occurrence was reduced from once a day
to once every 2 weeks in our production server.

The maintainer of Caffeine, Ben Manes pointed us to the possible
cause[3] of this issue, a bug[4] in the kernel and its fix[5]. Our
kernel version is supposed to have the fix but we will try another OS
and kernel version.

Replacing Guava caches by Caffeine brings 2 things, it reduces the
chances of having the deadlock most likely caused by a kernel bug and
improve the cache performance.

[1]https://github.com/ben-manes/caffeine
[2]https://github.com/ben-manes/caffeine/wiki/Benchmarks
[3]https://groups.google.com/forum/#!topic/mechanical-sympathy/QbmpZxp6C64
[4]b0c29f79ec
[5]76835b0ebf

Bug: Issue 7645
Change-Id: I8d2b17a94d0e9daf9fa9cdda563316c5768b29ae
2018-02-22 18:53:47 +00:00
Han-Wen Nienhuys
a76ca4a345 Move //lib:common-io to //lib/commons:io
Change-Id: I1bd002a0073acb44d0033b6b994eb1c5129c76ec
2018-01-24 15:21:30 +01:00
David Pursehouse
636c7ef111 Upgrade Guava to 23.5
The minor releases since 23.0 include several bug fixes.

See the release notes [1,2,3,4,5] for details.

This also adds the missing dependency on j2objc-annotations:

  INFO: From Building java/com/google/gerrit/lucene/liblucene.jar (12 source files):
  warning: unknown enum constant ReflectionSupport$Level.FULL
    reason: class file for com.google.j2objc.annotations.ReflectionSupport$Level not found

[1] https://github.com/google/guava/releases/tag/v23.1
[2] https://github.com/google/guava/releases/tag/v23.2
[3] https://github.com/google/guava/releases/tag/v23.3
[4] https://github.com/google/guava/releases/tag/v23.4
[5] https://github.com/google/guava/releases/tag/v23.5

Change-Id: I43aa05b3e82723d894e58d91a84f184009f39bc0
2017-12-17 15:12:17 +09:00
Paladox
c1609c6fa7 Merge branch 'stable-2.15'
* stable-2.15:
  Upgrade GWT to version 2.8.2
  Remove duplicate SHA1 variable in js.bzl

Change-Id: I6a612513e281accc197e88bbeceeef3ecb77e170
2017-10-23 12:35:11 +01:00
David Pursehouse
4142f2d949 Upgrade GWT to version 2.8.2
This version includes a fix for incorrect getAbsoluteLeft/Top values in
Chrome 61 and later [1], plus various other bugfixes. See the release
notes [2] for full details.

See also the release notes for 2.8.1 [3] which is also included in this
upgrade.

[1] https://github.com/gwtproject/gwt/issues/9542
[2] http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_2
[3] http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_1

Bug: Issue 7519
Change-Id: If6da895e1349336b8853767a537ed4a09c2773f5
2017-10-23 19:44:57 +09:00
David Pursehouse
cb6597828b Remove support for Velocity templates
Remove the dependency on the velocity template library, and all code
related to reading and parsing velocity templates.

With this change, Gerrit no longer recognizes or handles Velocity
templates (*.vm) for emails. Site administrators must replace any
Velocity templates with the equivilant Soy templates before upgrading
to a Gerrit version that includes this change.

Update the mail config documentation to clarify that Velocity is no
longer supported.

Change-Id: I9942eb1a94adfa677c5a25634f3a1fee68c680fa
2017-10-13 11:33:43 +00:00
Paladox none
761a19ebc3 Update soy to 2017-02-01
New release depends on safe-html-types that is released under Apache 2
license: [1].

[1] https://github.com/google/safe-html-types
Change-Id: If46fcf6dd2e7ad7e2c6eac0906e5df0fa401b6cc
2017-03-17 05:33:26 +01:00
Dave Borowitz
39bc108a39 Make implicit reviewers feature actually work on GWT UI
This was presumably fixed in Ia5e6b9791 and in I8b735db4f. It turns
out, that labels map is not null in GWT UI, as it is the case in PG,
but also non empty, even in non-voting case: Code-Review: 0.

Fix the optimization check to account for zero votes.

Bug: Issue 4638
Change-Id: I6d9a2cc42ec51e6b1df13b96cf4bcdd082c87f60
2017-02-11 06:19:54 +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
Han-Wen Nienhuys
c1a6976b50 bazel: put source jars in the same package.
This lets us associate the jar and the src jar in the java_import()
declaration, so IDE plugins could understand how artifacts and source
are connected.

Classpath generation for Eclipse IDE was adjusted to reflect the changed
location of the source artifact.

Change-Id: I2cf9c6db3ad4b648457f2ac8d380c3771b4a3ee2
2016-11-30 08:48:20 +01:00
David Ostrovsky
6546085df7 Bazel: use a custom maven_jar rule
Using existing download_file.py from custom maven_jar Skylark rule
gives us the following advantages:

* fetching of sources (needed for GWT JSNI build and IDE integration)
* server support for proxies
* global, per-user cache of artifacts
* support for local maven repository (~/.m2)

Change-Id: Ic246dd9298775a6819f05453c601c688d8cb7ab9
2016-11-09 08:31:11 +01:00
Han-Wen Nienhuys
28e7a6d3fe bazel: bower support
* npm_binary (download tarball packaged npm apps)

* bower_archive (download a zip file, to be put in WORKSPACE)

* bower_component (defining a bower library, with dependency )

* bower_component_bundle (zipping up libraries together)

* js_component (insert plain js file into bower component bundle)

* bower2bazel.py: run bower to find dependencies, generate a .bzl to
  define archives and define components

Tested:

 python tools/js/bower2bazel.py -w lib/js/bower_archives.bzl -b \
    lib/js/bower_components.bzl

 bazel build polygerrit-ui:components
 unzip -v bazel-bin/polygerrit-ui/components.zip > /tmp/baz

 buck build polygerrit-ui:polygerrit_components
 unzip -v buck-out/gen/polygerrit-ui/polygerrit_components/polygerrit_components.bower_components.zip > /tmp/buck

 diff /tmp/buck /tmp/baz

The diff corresponds to newer file versions pinned through bower2bazel.

Change-Id: I4f33914d4853bcf8afe78b4719d0e0e83b139031
2016-09-29 13:18:19 +02:00
Yuxuan 'fishy' Wang
9d0e8eac3b bazel: generate licenses.txt
Modify license_map rule to:

- Accept more than 1 targets
- Add '--asciidoctor' option to generate asciidoctor txt file
- Add support for multiple licenses for a single target (diffy_logo)

Also add test_license.sh for license_test rule to handle special
DO_NOT_DISTRIBUTE exceptions.

TESTED:
  bazel build Documentation:licenses.txt
  bazel test gerrit-pgm:pgm_license_test
  bazel test gerrit-gwtui:ui_module_license_test

Change-Id: Ic64b227fea34882721e6e064b1520cd9a4d5d4a4
2016-09-28 04:57:42 +08: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
David Ostrovsky
c48e6c9730 Bazel: Build core plugins
Change-Id: Ic8ed6fcdb8cdab9cb7eaba436c5fdffc6670d1b4
2016-09-23 14:20:13 +02:00
Han-Wen Nienhuys
c65ad9749c bazel: add test that forbids DO_NOT_DISTRIBUTE in //gerrit-pgm:pgm.
Change-Id: Idf4695294c34bbca157d104cfb6e708bac727473
2016-09-21 19:52:53 +00:00
Han-Wen Nienhuys
eb16fe05a1 bazel: generate license list for documentation.
Example:

    $ bazel build //Documentation:pgm-licenses.txt
    ..
    $ cat bazel-genfiles/Documentation/pgm-licenses.txt
    //lib:jsch //lib:LICENSE-jsch
    //lib:servlet-api-3_1 //lib:LICENSE-Apache2.0

Still missing:

* check that there are dependencies on forbidden licenses

* check that there are no external dependencies except through the
  //lib directory.

Change-Id: I8f0ed94de20f68e0dbc1fe87dfd56ce11e02fab7
2016-09-21 18:34:56 +00:00
David Ostrovsky
f6b7d4a18d Bazel: Produce headless war
This change creates the archive with:

lib
pgm-lib
default web assets

but without:

GWT UI
PolyGerrit UI
Plugins
Documentation

TEST PLAN:

  bazel build :headless
  java -jar bazel-bin/headless.war init -d ../test_site_bazel

Change-Id: I53987b10a5863aee0298bd2ea29405c26dbacb0c
2016-09-20 09:16:56 +02:00
Han-Wen Nienhuys
bcb46c3cd8 bazel: upgrade Guice to 4.1.0, add multibindings
Change-Id: If9da85ffa0d5f5eba355764c28fca9d33664f894
2016-08-25 15:32:56 -03:00
Patrick Hiesel
42300f6f76 Fix bazel build
After adding the soy lib to buck, it needs to be added to bazel as well.

Tested with:
  bazel build //...

Change-Id: Ibc65a3d2d37a353a73a3f1e546dfc974b6e0b3c0
2016-08-25 15:07:31 +02: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