David Pursehouse | 31c8240 | 2019-09-04 15:02:32 +0900 | [diff] [blame] | 1 | load("@rules_java//java:defs.bzl", "java_library") |
David Ostrovsky | 0c36f1f | 2017-08-21 08:24:33 +0200 | [diff] [blame] | 2 | load("//tools/bzl:genrule2.bzl", "genrule2") |
| 3 | |
| 4 | genrule2( |
| 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 Nienhuys | d347f02 | 2018-02-07 17:53:34 +0100 | [diff] [blame] | 11 | "find . -exec touch -t 198001010000 '{}' ';'", |
| 12 | "zip -q $$ROOT/$@ $$(find . -type f)", |
David Ostrovsky | 0c36f1f | 2017-08-21 08:24:33 +0200 | [diff] [blame] | 13 | ]), |
| 14 | tools = [ |
| 15 | "//lib/antlr:antlr-tool", |
David Ostrovsky | 0c36f1f | 2017-08-21 08:24:33 +0200 | [diff] [blame] | 16 | ], |
| 17 | visibility = ["//visibility:public"], |
| 18 | ) |
David Ostrovsky | f51cf23 | 2018-08-31 06:19:26 +0200 | [diff] [blame] | 19 | |
| 20 | java_library( |
| 21 | name = "query_parser", |
| 22 | srcs = [":query"], |
| 23 | visibility = [ |
Dave Borowitz | 01bcdf4 | 2019-03-22 11:45:11 -0700 | [diff] [blame] | 24 | "//java/com/google/gerrit/index:__subpackages__", |
Wendy Wang | 1744904 | 2022-04-04 09:07:37 +0200 | [diff] [blame] | 25 | "//java/com/google/gerrit/server:__subpackages__", |
Dave Borowitz | 01bcdf4 | 2019-03-22 11:45:11 -0700 | [diff] [blame] | 26 | "//javatests/com/google/gerrit:__subpackages__", |
David Ostrovsky | f51cf23 | 2018-08-31 06:19:26 +0200 | [diff] [blame] | 27 | "//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 | ) |