blob: 23641e3e2b5a656d5506fd487a1bc4ca71630f41 [file] [log] [blame]
David Pursehouse31c82402019-09-04 15:02:32 +09001load("@rules_java//java:defs.bzl", "java_library")
David Ostrovsky0c36f1f2017-08-21 08:24:33 +02002load("//tools/bzl:genrule2.bzl", "genrule2")
3
4genrule2(
5 name = "query",
6 srcs = ["com/google/gerrit/index/query/Query.g"],
7 outs = ["query_antlr.srcjar"],
8 cmd = " && ".join([
9 "$(location //lib/antlr:antlr-tool) -o $$TMP $<",
10 "cd $$TMP",
Han-Wen Nienhuysd347f022018-02-07 17:53:34 +010011 "find . -exec touch -t 198001010000 '{}' ';'",
12 "zip -q $$ROOT/$@ $$(find . -type f)",
David Ostrovsky0c36f1f2017-08-21 08:24:33 +020013 ]),
14 tools = [
15 "//lib/antlr:antlr-tool",
David Ostrovsky0c36f1f2017-08-21 08:24:33 +020016 ],
17 visibility = ["//visibility:public"],
18)
David Ostrovskyf51cf232018-08-31 06:19:26 +020019
20java_library(
21 name = "query_parser",
22 srcs = [":query"],
23 visibility = [
Dave Borowitz01bcdf42019-03-22 11:45:11 -070024 "//java/com/google/gerrit/index:__subpackages__",
Wendy Wang17449042022-04-04 09:07:37 +020025 "//java/com/google/gerrit/server:__subpackages__",
Dave Borowitz01bcdf42019-03-22 11:45:11 -070026 "//javatests/com/google/gerrit:__subpackages__",
David Ostrovskyf51cf232018-08-31 06:19:26 +020027 "//javatests/com/google/gerrit/index:__pkg__",
28 "//plugins:__pkg__",
29 ],
30 deps = [
31 "//java/com/google/gerrit/index:query_exception",
32 "//lib/antlr:java-runtime",
33 ],
34)