Move gerrit-index/antlr3 sources to top-level antlr3 directory

Change-Id: I75d6bc4d7af2cb17622ef0f722f88f068509cb46
This commit is contained in:
David Ostrovsky 2017-08-21 08:24:33 +02:00 committed by Dave Borowitz
parent 2f9d9877b9
commit 0c36f1f74a
4 changed files with 19 additions and 17 deletions

17
antlr3/BUILD Normal file
View File

@ -0,0 +1,17 @@
load("//tools/bzl:genrule2.bzl", "genrule2")
genrule2(
name = "query",
srcs = ["com/google/gerrit/index/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",
],
visibility = ["//visibility:public"],
)

View File

@ -12,24 +12,9 @@ java_library(
visibility = ["//visibility:public"],
)
genrule2(
name = "query_antlr",
srcs = ["src/main/antlr3/com/google/gerrit/index/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"],
srcs = ["//antlr3:query"],
visibility = ["//gerrit-plugin-api:__pkg__"],
deps = [
":query_exception",

View File

@ -22,7 +22,7 @@ java_binary(
name = "antlr-tool",
jvm_flags = ["-XX:-UsePerfData"],
main_class = "org.antlr.Tool",
visibility = ["//gerrit-index:__pkg__"],
visibility = ["//antlr3:__pkg__"],
runtime_deps = [":tool"],
)