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', out = 'query_parser.jar', ) prebuilt_jar( name = 'query_parser', binary_jar = ':query_link', deps = PARSER_DEPS, visibility = ['PUBLIC'], )