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
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
gwt_binary() uses Bazel feature to retrieve the sources from the
dependency libraries. For the standalone API this feature cannot be
used as the only dependency is GWT UI plugin API. Expose the sources
in GWT UI plugin API as well.
TEST PLAN:
Apply this change and create the plugin API:
$ ./tools/maven/api.sh install
Apply reviewers plugin Bazel build implementation change: [1] and
verify, that the reviewers plugin can be built with the GWT UI plugin
API created with this change.
[1] https://gerrit-review.googlesource.com/91830
Change-Id: I2b065a8eccbc33020d461834704d684871f463d7
TEST PLAN:
$ bazel build plugins/cookbook-plugin
Deploy to the server site and verify that it works.
Change-Id: I98af807f9c92ba4ed7efad332d8fdee407bb8ce6
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
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