| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* stable-2.15:
Bazel: Automatically fix lint errors with buildifier 0.20.0
Bazel: Fix more buildifier warnings
Bazel: Automatically fix lint errors with buildifier 0.20.0
Fix typo in documentation of edit preferences
Bazel: Automatically fix lint errors with buildifier
Change-Id: I3400928e4dca65264715dca3c29729237934f042
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In recent buildifier versions, lint errors can be fixed automatically:
$ find . \( -name BUILD -o -name "*.bzl" \) -print \
| xargs buildifier --lint=fix
This commit was created with Buildifier version 0.19.2:
$ buildifier --version
buildifier version: 0.19.2
buildifier scm revision: d39e4d5c25111527369142f16cdb49aa67707313
Change-Id: I1f06cd4596e794981ccc2d9fc2d1da9b17f3973a
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
According to the documentation [1], the expected values for testonly
are True and False. Replace all the current usages of "1" with "True".
[1] https://docs.bazel.build/versions/master/be/common-definitions.html
Change-Id: I89417f6f9d56e126a6b05edeaaa946934799ab23
|
|\|
| |
| |
| |
| |
| |
| |
| | |
* stable-2.15:
config-plugins: Move 'review-strategy' out of the core plugins section
Bazel: Clean up package visibility settings
Change-Id: Ia29fd049fe241dfbb15bc07a0e7ac2fb31d97c33
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bazel@HEAD doesn't support Java 10 any more. The tool chain is extended
to support building with Java 10 using host_javabase option and vanilla
java builder. To use --host_javabase option we have to provide absolute
path to the JDK 10. To keep that non-portable part out of the build file
we use variable that is substitued during build invocation. Say, the
location of the JDK 10 is: /usr/lib64/jvm/java-10, then the build is
invoked with:
$ bazel build --host_javabase=:absolute_javabase \
--define=ABSOLUTE_JAVABASE=/usr/lib64/jvm/java-10 ...
Given that absolute_javabase rule is not a part of released Bazel yet,
but will be only included in future Bazel releases, we have to add it in
our own build file:
java_runtime(
name = "absolute_javabase",
java_home = "$(ABSOLUTE_JAVABASE)",
visibility = ["//visibility:public"],
)
While this works, it fails the Gerrit-CI, because recently it was
changed to exercise //... rule, and cannot resolve ABSOLUTE_JAVABASE
variable, because it wasn't provided in the CI environment. CI is still
using Java 8.
One approach to address that problem would be to use "manual" tag for a
rule that would exclude it from generic targets like //..., but
unfortunately, java_runtime rule doesn't expose tag attribute.
The next workaround is to hide that variable behind a select statement.
This is a harmless hack:
config_setting(
name = "use_absolute_javabase",
values = {"define": "USE_ABSOLUTE_JAVABASE=true"},
)
java_runtime(
name = "absolute_javabase",
java_home = select({
":use_absolute_javabase": "$(ABSOLUTE_JAVABASE)",
"//conditions:default": "",
}),
visibility = ["//visibility:public"],
)
Now from the CI the rule: //:absolute_javabase would produce non working
java_runtime, because java_home wasn't specified, but given that this
java_runtime is not used during the build, it doesn't matter. Add also
a TODO comment to replace that interim solution when absolute_javabase
is supported in released Bazel version. As the consequence for hiding
that rule behind a condition, we need to provide additional variable so
that Bazel can correctly resolve java_home in java_runtime rule:
$ bazel build --host_javabase=:absolute_javabase \
--define=ABSOLUTE_JAVABASE=/usr/lib64/jvm/java-10 \
--define=USE_ABSOLUTE_JAVABASE=true [...]
Also extend tools/eclipse/project.py to accept Java 10 specific options.
There is already --java <jdk number> option that was added recently to
support Eclipse .classpath generation when JDK 9 is used, but this can
not be used, because for Java 10 we have to provide absolute path to the
Java 10 location. Add new option --edge_java where all Java 10 specific
options can be passed:
$ tools/eclipse/project.py --edge_java \
"--host_javabase=:absolute_javabase \
--define=ABSOLUTE_JAVABASE=/usr/lib64/jvm/java-10 \
--define=USE_ABSOLUTE_JAVABASE=true \
--host_java_toolchain=//:toolchain_vanilla \
--java_toolchain=//:toolchain_vanilla"
Alternative approach would be to add those options to Bazel resource
file.
Test Plan:
$ bazel build --host_javabase=:absolute_javabase \
--define=ABSOLUTE_JAVABASE=/usr/lib64/jvm/java-10 \
--define=USE_ABSOLUTE_JAVABASE=true \
--host_java_toolchain=//:toolchain_vanilla \
--java_toolchain=//:toolchain_vanilla \
:release
and replace ABSOLUTE_JAVABASE variable with the location of JDK 10.
To verify that major version of generated classes is 54, use:
$ $JAVA_HOME/bin/javap -verbose \
-cp bazel-bin/java/com/google/gerrit/common/libserver.jar \
com.google.gerrit.common.data.ProjectAccess | grep "major version"
54
[1] https://github.com/bazelbuild/bazel/issues/6012
Change-Id: I5e652f7a19afbcf3607febd9a7a165dc07918bd0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bazel@HEAD supports Java 9 and the upcoming Bazel release 0.15.0 will
include Java 9 JDK.
Test Plan:
$ bazel test \
--host_java_toolchain=@bazel_tools//tools/jdk:toolchain_java9 \
--java_toolchain=@bazel_tools//tools/jdk:toolchain_java9 //...
Change-Id: I9d6b716391bbf96b0894a8f3be900bcf8ef48903
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
GWT is going to be removed in next gerrit releases, and it is already
removed from gerrit-review. To not waste too much developers time we
remove GWT from `bazel build gerrit`. release.war is not affected
by this change.
Change-Id: I9b92194c61ac0b6cd80f4d5b07e2dba0b74b950a
|
| |
| |
| |
| | |
Change-Id: If83f4c6dca1251c2b632a914fa7c521791490d2c
|
| |
| |
| |
| | |
Change-Id: Ibf27b61d867eef7539fc85f92aab1b051082e964
|
| |
| |
| |
| | |
Change-Id: I16f1aa0714bb653bb1f81b503beeeac1c9fc1d64
|
|/
|
|
| |
Change-Id: I47a130d3203cf45ce09f2a44e81449c55eaa693b
|
|
|
|
|
|
|
| |
Formatted with buildifier version 0.4.3 installed via homebrew
on OSX.
Change-Id: Iab54e118a5d119b5c031838c267b848b8ead30f2
|
|
|
|
|
|
|
|
|
| |
This simplifies house keeping for the CI implementations and this was
always supported in Buck driven build. Wenn new API is added, only one
rule needs to be updated, and all CI implementation would reflect
building of new API without any changes on their side.
Change-Id: I050cef1e1545431d8806bd3a15a267842e3ed809
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: If5d59f3afde2f9a4bdf4e7dab9eef6b3c5c93693
|
|
|
|
| |
Change-Id: Ide3114d14cc8acc722f6e04cf2fc357d16775df9
|
|
|
|
| |
Change-Id: Id45967aa844faedee3ab501491cd30cdb903a789
|
|
|
|
|
|
|
|
|
| |
bazel: generate the workspace version from the volatile status.
To work across bazel 0.3.1 and 0.3.2, we should grep both volatile and
stable status files for the magic version string.
Change-Id: I48361374a8d9cda1e7a5b5db4e147bc49b4452a3
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bazel 0.3.2 introduced regression: [1] workspace_status_command seems to
be ignored. That broke Bazel build. Revert this change and re-consider to
re-apply it, when the problem is fixed upstream.
* [1] https://github.com/bazelbuild/bazel/issues/1976
This reverts commit 214171ddda6c173e528affee625aa65db8dcc360.
Change-Id: I729ffaf6ae1bff5fb858d78de2a6915058c9e651
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement genasciidoc rule for bazel. It's a filegroup containing all
the html and resource files.
Also implement genasciidoc_zip rule for bazel, which is similar to
buck's genasciidoc rule to produce a zip file containing all asciidoctor
generated and resource files.
TEST PLAN:
bazel build Documentation
buck build Documentation:html
diff -u bazel-bin/Documentation/install.html buck-out/gen/Documentation/html__tmp/Documentation/install.html
Change-Id: I3065355800a982c6956d3bb634204baaa60c045e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I382757618 added the Bazel build for core pluins, but missed to add
plugins/BUILD file.
TEST PLAN:
bazel build release
unzip -t bazel-bin/release.war | grep --regex "plugins/.*.jar" | wc -l
6
Change-Id: I3338541ec61905db6658761fa5c6fc374dba0348
|
|
|
|
| |
Change-Id: Icb9f9f0344b10a008d5b353362933890446eb544
|
|
|
|
|
|
|
|
|
|
| |
This generates a version file that looks correct, but doesn't rebuild
correctly. Correct rebuilds will be provided by a version of
bazel containing
https://github.com/bazelbuild/bazel/commit/a2897bff4c16c07793279f425d2627ce7bf3e232
Change-Id: I5101d7f2643d464cf32c8281a28ec6c3fc4fa2cf
|
|
|
|
| |
Change-Id: I382757618721ef43bd6fa9ada7d120df27dcc082
|
|
|
|
|
|
|
|
|
|
|
|
| |
TEST PLAN:
bazel build :gerrit
java -jar bazel-bin/gerrit.war init -d ../test_site_bazel
Verify that complete Gerrit installation including GWT UI is up and
running.
Change-Id: I2e9097b1bc59f0a22269449c15583f12d75acf65
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
Change-Id: I962fccfea823f42be186d518591145c6278021ba
|