Only testonly targets (such as tests) need to use junit. In particular this involves making the toplevel :all rule testonly. It's not clear to me what that rule is for --- "bazel build //..." already works to build all targets. In any case it appears to be for testing, so marking it as testonly shouldn't be harmful. Change-Id: I28ff508ab8ce2ec0a0111109110aa9680d30600etags/v4.7.0.201704051617-r
@@ -2,6 +2,7 @@ package(default_visibility = ["//visibility:public"]) | |||
genrule( | |||
name = "all", | |||
testonly = 1, | |||
srcs = [ | |||
"//org.eclipse.jgit:jgit", | |||
"//org.eclipse.jgit.archive:jgit-archive", |
@@ -39,7 +39,8 @@ java_library( | |||
java_library( | |||
name = "junit", | |||
visibility = ["//org.eclipse.jgit.junit:__pkg__"], | |||
testonly = 1, | |||
visibility = ["//visibility:public"], | |||
exports = ["@junit//jar"], | |||
) | |||
@@ -2,6 +2,7 @@ package(default_visibility = ["//visibility:public"]) | |||
java_library( | |||
name = "junit", | |||
testonly = 1, | |||
srcs = glob(["src/**"]), | |||
resource_strip_prefix = "org.eclipse.jgit.junit/resources", | |||
resources = glob(["resources/**"]), |