12 Commits

Author SHA1 Message Date
David Pursehouse
8b3324c69e Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  Apply buildifier to .bzl files.
  Update Bower to 1.8.2
  Bump commons-io version to 2.2

Change-Id: Ic90865db76a0e34f0f8fef33b83ec7b2fd75c875
2018-07-11 08:35:07 +09:00
Han-Wen Nienhuys
b6a4048986 Apply buildifier to .bzl files.
Buildifier is now also used for formatting .bzl files.

This change was created by running buildifier 0.12 over our source tree.

Change-Id: I9f15112d4fe23e5cec0700cfe47f1ca649f61d2a
2018-07-10 20:38:52 +09:00
David Pursehouse
a5d14bdd0a Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  Add integration test classes for "ssh index" commands
  Bazel: Harmonize names of external repositories

Change-Id: I081bb8c1fc148f7a86b82586a47ac445f521d8bb
2018-06-12 10:10:44 +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
David Pursehouse
4042d43567 Merge branch 'stable-2.14'
* stable-2.14:
  Bazel: Allow plugins to non-transitively depend on prolog rules

Change-Id: I6d9c7e4795249ab8c97fb064f0ebb2dd5aee8ef1
2017-05-17 19:48:49 +09:00
David Ostrovsky
b9400254a6 Bazel: Allow plugins to non-transitively depend on prolog rules
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
2017-05-17 08:51:13 +02:00
David Ostrovsky
a3844fca7f Bazel: Simplify prolog_cafe_library rule implementation
genrule2 exposes root and temp directpries, but these are not used in
this rule, so that we can just use native genrule.

Change-Id: Id1e56ba47bf04a73559ff84a7c8f69745a6b3129
2017-05-17 06:23:51 +02:00
David Pursehouse
2d08500516 Format .bzl files with Bazel Buildifier
Change-Id: I3ab30565e5ac110a18cbe3d34f76307801c30373
2016-12-11 19:00:21 +09:00
Han-Wen Nienhuys
29cced5e29 bazel: remove 'out' attribute from genrule2, and use throughout.
This centralizes the OSX mktemp solution.

Change-Id: Iaab18450146b649245b36865bedc5d7b50d1aa07
2016-11-02 13:54:10 +01:00
Han-Wen Nienhuys
b00302e0ce bazel: pass down **kwargs for some bzl macros.
Change-Id: If136681cc5605d4c945c06c5f01f410d9a98e016
2016-10-10 11:11:45 +02:00
Han-Wen Nienhuys
7eb9ee7621 bazel: for the prolog compiler rule, don't use $TMP as temp dir.
The prolog compiler tries to be transactional by renaming a temp file to
its final destination. This only works if $TMP is on the same file
system as the final output.

Change-Id: I3b3d261d61ace2798fca96d849bce9f2bbd46bcd
2016-09-29 16:55:14 +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