diff --git a/antlr3/BUILD b/antlr3/BUILD index 6d7102aa76..fc96715eb5 100644 --- a/antlr3/BUILD +++ b/antlr3/BUILD @@ -15,3 +15,17 @@ genrule2( ], visibility = ["//visibility:public"], ) + +java_library( + name = "query_parser", + srcs = [":query"], + visibility = [ + "//java/com/google/gerrit/index:__pkg__", + "//javatests/com/google/gerrit/index:__pkg__", + "//plugins:__pkg__", + ], + deps = [ + "//java/com/google/gerrit/index:query_exception", + "//lib/antlr:java-runtime", + ], +) diff --git a/java/com/google/gerrit/index/BUILD b/java/com/google/gerrit/index/BUILD index 6604ca14b7..d5517e11d5 100644 --- a/java/com/google/gerrit/index/BUILD +++ b/java/com/google/gerrit/index/BUILD @@ -11,19 +11,6 @@ java_library( visibility = ["//visibility:public"], ) -java_library( - name = "query_parser", - srcs = ["//antlr3:query"], - visibility = [ - "//javatests/com/google/gerrit/index:__pkg__", - "//plugins:__pkg__", - ], - deps = [ - ":query_exception", - "//lib/antlr:java-runtime", - ], -) - java_library( name = "index", srcs = glob( @@ -33,7 +20,7 @@ java_library( visibility = ["//visibility:public"], deps = [ ":query_exception", - ":query_parser", + "//antlr3:query_parser", "//java/com/google/gerrit/common:annotations", "//java/com/google/gerrit/extensions:api", "//java/com/google/gerrit/metrics", diff --git a/javatests/com/google/gerrit/index/BUILD b/javatests/com/google/gerrit/index/BUILD index 14a7048d4b..5597ed1bb3 100644 --- a/javatests/com/google/gerrit/index/BUILD +++ b/javatests/com/google/gerrit/index/BUILD @@ -6,9 +6,9 @@ junit_tests( srcs = glob(["**/*.java"]), visibility = ["//visibility:public"], deps = [ + "//antlr3:query_parser", "//java/com/google/gerrit/index", "//java/com/google/gerrit/index:query_exception", - "//java/com/google/gerrit/index:query_parser", "//lib:guava", "//lib:junit", "//lib/antlr:java-runtime", diff --git a/plugins/BUILD b/plugins/BUILD index ef18e012a0..b7364be5b7 100644 --- a/plugins/BUILD +++ b/plugins/BUILD @@ -27,12 +27,12 @@ PLUGIN_API = [ ] EXPORTS = [ + "//antlr3:query_parser", "//java/com/google/gerrit/common:annotations", "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//java/com/google/gerrit/index", "//java/com/google/gerrit/index:query_exception", - "//java/com/google/gerrit/index:query_parser", "//java/com/google/gerrit/lifecycle", "//java/com/google/gerrit/metrics", "//java/com/google/gerrit/metrics/dropwizard", @@ -100,13 +100,13 @@ java_binary( main_class = "Dummy", visibility = ["//visibility:public"], runtime_deps = [ + "//antlr3:libquery_parser-src.jar", "//java/com/google/gerrit/common:libannotations-src.jar", "//java/com/google/gerrit/common:libserver-src.jar", "//java/com/google/gerrit/extensions:libapi-src.jar", "//java/com/google/gerrit/httpd:libhttpd-src.jar", "//java/com/google/gerrit/index:libindex-src.jar", "//java/com/google/gerrit/index:libquery_exception-src.jar", - "//java/com/google/gerrit/index:libquery_parser-src.jar", "//java/com/google/gerrit/pgm/init/api:libapi-src.jar", "//java/com/google/gerrit/reviewdb:libserver-src.jar", "//java/com/google/gerrit/server:libserver-src.jar", @@ -121,9 +121,9 @@ load("//tools/bzl:javadoc.bzl", "java_doc") java_doc( name = "plugin-api-javadoc", libs = PLUGIN_API + [ + "//antlr3:query_parser", "//java/com/google/gerrit/index", "//java/com/google/gerrit/index:query_exception", - "//java/com/google/gerrit/index:query_parser", "//java/com/google/gerrit/common:annotations", "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api",