blob: 57e7e1d2edccb0c1d6f7313f6cdb7eb6e8533e88 [file] [log] [blame]
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 = [genfile('query_antlr.src.zip')],
deps = PARSER_DEPS + [':query_antlr'],
)
# 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 = genfile('query_parser.jar'),
deps = PARSER_DEPS + [':query_link'],
visibility = ['PUBLIC'],
)