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
For packages having a default visiblity defined, it is redundant to also
set the same visibility per package, so remove those.
For packages that only have one rule, and its visibility differs from the
default visibility, remove the default visibility.
Also clean up wrapping of some of the default definitions.
Change-Id: I9e81c3f724b4ffde7a652b485d33c650866ad122
In changes I02ce9c6b6 ("Optimize USER_NAME_PATTERN string and its
usage") and I8082b2ad3 ("Account.java: introduce compiled pattern
and use where applicable"), the usage of Account.USER_NAME_PATTERN
was refactored.
This refactoring conflicts with separate refactoring that was done
on the master branch. Instead of trying to resolve the conflicts,
which ends up with the changes effectively being reverted, just
revert them here. The refactoring that was done on master can then
be backported here.
This reverts commit 1ee03aa948553654283702220cbf36798ac1e45e.
This reverts commit cf97d694febd26aeea66c6f16355a721860f80fd.
Change-Id: I199d2f1531ec2b59d4263f1b72f1c967913bb9a5
There is no point in compiling USER_NAME_PATTERN over and over again
in all those places where it is used hence compiled version was added.
Note that original version was kept so that there is no collateral
damage in plugins that use it.
Change-Id: I8082b2ad3e04a6407e9c41f969a0e274386b63ab
Signed-off-by: Jacek Centkowski <jcentkowski@collab.net>
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
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
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