fa18907d7f
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
33 lines
856 B
Python
33 lines
856 B
Python
load("//tools/bzl:genrule2.bzl", "genrule2")
|
|
|
|
java_library(
|
|
name = "query_exception",
|
|
srcs = ["src/main/java/com/google/gerrit/server/query/QueryParseException.java"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
genrule2(
|
|
name = "query_antlr",
|
|
srcs = ["src/main/antlr3/com/google/gerrit/server/query/Query.g"],
|
|
outs = ["query_antlr.srcjar"],
|
|
cmd = " && ".join([
|
|
"$(location //lib/antlr:antlr-tool) -o $$TMP $<",
|
|
"cd $$TMP",
|
|
"$$ROOT/$(location @bazel_tools//tools/zip:zipper) cC $$ROOT/$@ $$(find .)",
|
|
]),
|
|
tools = [
|
|
"//lib/antlr:antlr-tool",
|
|
"@bazel_tools//tools/zip:zipper",
|
|
],
|
|
)
|
|
|
|
java_library(
|
|
name = "query_parser",
|
|
srcs = [":query_antlr"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":query_exception",
|
|
"//lib/antlr:java_runtime",
|
|
],
|
|
)
|