diff --git a/Documentation/dev-contributing.txt b/Documentation/dev-contributing.txt index e79a802562..acd364a42e 100644 --- a/Documentation/dev-contributing.txt +++ b/Documentation/dev-contributing.txt @@ -171,7 +171,7 @@ To format Java source code, Gerrit uses the link:https://github.com/google/google-java-format[`google-java-format`] tool (version 1.7), and to format Bazel BUILD, WORKSPACE and .bzl files the link:https://github.com/bazelbuild/buildtools/tree/master/buildifier[`buildifier`] -tool (version 0.26.0). +tool (version 0.28.0). These tools automatically apply format according to the style guides; this streamlines code review by reducing the need for time-consuming, tedious, and contentious discussions about trivial issues like whitespace. diff --git a/gerrit-gwtui/BUILD b/gerrit-gwtui/BUILD index 2f95e848b1..24718e5ab8 100644 --- a/gerrit-gwtui/BUILD +++ b/gerrit-gwtui/BUILD @@ -4,9 +4,9 @@ load( "gwt_genrule", "gwt_user_agent_permutations", ) +load("//tools/bzl:java.bzl", "java_library2") load("//tools/bzl:junit.bzl", "junit_tests") load("//tools/bzl:license.bzl", "license_test") -load("//tools/bzl:java.bzl", "java_library2") gwt_genrule() diff --git a/java/com/google/gerrit/extensions/BUILD b/java/com/google/gerrit/extensions/BUILD index 899df78d8c..5ba510c8ca 100644 --- a/java/com/google/gerrit/extensions/BUILD +++ b/java/com/google/gerrit/extensions/BUILD @@ -1,6 +1,6 @@ load("@rules_java//java:defs.bzl", "java_binary", "java_library") -load("//lib/jgit:jgit.bzl", "JGIT_DOC_URL") load("//lib:guava.bzl", "GUAVA_DOC_URL") +load("//lib/jgit:jgit.bzl", "JGIT_DOC_URL") load("//tools/bzl:gwt.bzl", "gwt_module") load("//tools/bzl:javadoc.bzl", "java_doc") diff --git a/tools/BUILD b/tools/BUILD index 608bbb8634..708302bea4 100644 --- a/tools/BUILD +++ b/tools/BUILD @@ -1,10 +1,10 @@ -load("@rules_python//python:defs.bzl", "py_binary") -load("@rules_java//java:defs.bzl", "java_package_configuration") load( "@bazel_tools//tools/jdk:default_java_toolchain.bzl", "JDK9_JVM_OPTS", "default_java_toolchain", ) +load("@rules_java//java:defs.bzl", "java_package_configuration") +load("@rules_python//python:defs.bzl", "py_binary") exports_files(["nongoogle.bzl"]) diff --git a/tools/bzl/gwt.bzl b/tools/bzl/gwt.bzl index ea7004ea70..c269a07289 100644 --- a/tools/bzl/gwt.bzl +++ b/tools/bzl/gwt.bzl @@ -130,8 +130,9 @@ def _gwt_user_agent_module(ctx): "$p/%s cC $p/%s $(find . | sed 's|^./||')" % (ctx.executable._zip.path, gwt_user_agent_zip.path), ]) ctx.actions.run_shell( - inputs = [gwt_user_agent_xml] + ctx.files._zip, + inputs = [gwt_user_agent_xml], outputs = [gwt_user_agent_zip], + tools = ctx.files._zip, command = cmd, mnemonic = "GenerateUserAgentGWTModule", ) diff --git a/tools/bzl/junit.bzl b/tools/bzl/junit.bzl index eb6c5523c1..21d2cd8e7e 100644 --- a/tools/bzl/junit.bzl +++ b/tools/bzl/junit.bzl @@ -57,7 +57,7 @@ def _impl(ctx): ctx.attr.outname, )) -_GenSuite = rule( +_gen_suite = rule( attrs = { "srcs": attr.label_list(allow_files = True), "outname": attr.string(), @@ -75,7 +75,7 @@ POST_JDK8_OPTS = [ def junit_tests(name, srcs, **kwargs): s_name = name.replace("-", "_") + "TestSuite" - _GenSuite( + _gen_suite( name = s_name, srcs = srcs, outname = s_name,