Browse Source

bazel: Mark junit targets testonly

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: I28ff508ab8ce2ec0a0111109110aa9680d30600e
tags/v4.7.0.201704051617-r
Jonathan Nieder 7 years ago
parent
commit
02fe1e0b5b
3 changed files with 4 additions and 1 deletions
  1. 1
    0
      BUILD
  2. 2
    1
      lib/BUILD
  3. 1
    0
      org.eclipse.jgit.junit/BUILD

+ 1
- 0
BUILD View File

@@ -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",

+ 2
- 1
lib/BUILD View File

@@ -39,7 +39,8 @@ java_library(

java_library(
name = "junit",
visibility = ["//org.eclipse.jgit.junit:__pkg__"],
testonly = 1,
visibility = ["//visibility:public"],
exports = ["@junit//jar"],
)


+ 1
- 0
org.eclipse.jgit.junit/BUILD View File

@@ -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/**"]),

Loading…
Cancel
Save