d8af092c0a
genfile() is considered to be deprecated and is going to be discontinued in future Buck releases [1]. [1] https://groups.google.com/forum/#!topic/buck-build/Ci8Y95USD8I Change-Id: I7a5a1ee99d1448c412bb51b793c1e874dd3c62f4
38 lines
754 B
Python
38 lines
754 B
Python
PARSER_DEPS = [
|
|
':query_exception',
|
|
'//lib/antlr:java_runtime',
|
|
]
|
|
|
|
java_library(
|
|
name = 'query_exception',
|
|
srcs = ['src/main/java/com/google/gerrit/server/query/QueryParseException.java'],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
genantlr(
|
|
name = 'query_antlr',
|
|
srcs = ['src/main/antlr3/com/google/gerrit/server/query/Query.g'],
|
|
out = 'query_antlr.src.zip',
|
|
)
|
|
|
|
java_library(
|
|
name = 'lib',
|
|
srcs = [':query_antlr'],
|
|
deps = PARSER_DEPS,
|
|
)
|
|
|
|
# Hack necessary to expose ANTLR generated code as JAR to Eclipse.
|
|
genrule(
|
|
name = 'query_link',
|
|
cmd = 'ln -s $(location :lib) $OUT',
|
|
deps = [':lib'],
|
|
out = 'query_parser.jar',
|
|
)
|
|
|
|
prebuilt_jar(
|
|
name = 'query_parser',
|
|
binary_jar = ':query_link',
|
|
deps = PARSER_DEPS,
|
|
visibility = ['PUBLIC'],
|
|
)
|