Skip to content

Commit

Permalink
Extract authandtls, buildeventservice, buildeventstream into package-…
Browse files Browse the repository at this point in the history
…level BUILD files.

Replace all ":relative" labels with "//absolute:path" labels for easier search & replace.

PiperOrigin-RevId: 167500985
  • Loading branch information
philwo authored and meteorcloudy committed Sep 4, 2017
1 parent 263cb0d commit a94ef48
Show file tree
Hide file tree
Showing 14 changed files with 354 additions and 348 deletions.
567 changes: 251 additions & 316 deletions src/main/java/com/google/devtools/build/lib/BUILD

Large diffs are not rendered by default.

15 changes: 6 additions & 9 deletions src/main/java/com/google/devtools/build/lib/actions/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package(
default_visibility = ["//src:__subpackages__"],
package(default_visibility = ["//src:__subpackages__"])

filegroup(
name = "srcs",
srcs = glob(["**"]),
)

# Action graph and cache.
Expand All @@ -10,7 +13,6 @@ java_library(
"cache/*.java",
]),
deps = [
"//src/main/java/com/google/devtools/build/lib:buildeventstream",
"//src/main/java/com/google/devtools/build/lib:collect",
"//src/main/java/com/google/devtools/build/lib:concurrent",
"//src/main/java/com/google/devtools/build/lib:events",
Expand All @@ -20,6 +22,7 @@ java_library(
"//src/main/java/com/google/devtools/build/lib:unix",
"//src/main/java/com/google/devtools/build/lib:util",
"//src/main/java/com/google/devtools/build/lib:vfs",
"//src/main/java/com/google/devtools/build/lib/buildeventstream",
"//src/main/java/com/google/devtools/build/lib/buildeventstream/proto:build_event_stream_java_proto",
"//src/main/java/com/google/devtools/build/lib/causes",
"//src/main/java/com/google/devtools/build/lib/profiler",
Expand All @@ -34,9 +37,3 @@ java_library(
"//third_party/protobuf:protobuf_java",
],
)

filegroup(
name = "srcs",
testonly = 0, # All srcs should be not test only, overwrite package default.
srcs = glob(["**"]),
)
21 changes: 21 additions & 0 deletions src/main/java/com/google/devtools/build/lib/authandtls/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package(default_visibility = ["//src:__subpackages__"])

filegroup(
name = "srcs",
srcs = glob(["**"]),
)

java_library(
name = "authandtls",
srcs = glob(["*.java"]),
deps = [
"//src/main/java/com/google/devtools/common/options",
"//third_party:apache_httpclient",
"//third_party:apache_httpcore",
"//third_party:auth",
"//third_party:guava",
"//third_party:jsr305",
"//third_party:netty",
"//third_party/grpc:grpc-jar",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ java_library(
srcs = glob(["*.java"]),
deps = [
"//src/main/java/com/google/devtools/build/lib:build-base",
"//src/main/java/com/google/devtools/build/lib:buildeventstream",
"//src/main/java/com/google/devtools/build/lib:concurrent",
"//src/main/java/com/google/devtools/build/lib:events",
"//src/main/java/com/google/devtools/build/lib:packages-internal",
"//src/main/java/com/google/devtools/build/lib:syntax",
"//src/main/java/com/google/devtools/build/lib:util",
"//src/main/java/com/google/devtools/build/lib:vfs",
"//src/main/java/com/google/devtools/build/lib/bazel/repository/cache",
"//src/main/java/com/google/devtools/build/lib/buildeventstream",
"//src/main/java/com/google/devtools/build/skyframe",
"//third_party:guava",
"//third_party:jsr305",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package(default_visibility = ["//src:__subpackages__"])

filegroup(
name = "srcs",
srcs = glob(["**"]),
)

java_library(
name = "buildeventservice",
srcs = glob(["*.java"]),
visibility = [
"//visibility:public",
],
deps = [
"//src/main/java/com/google/devtools/build/lib:events",
"//src/main/java/com/google/devtools/build/lib:io",
"//src/main/java/com/google/devtools/build/lib:runtime",
"//src/main/java/com/google/devtools/build/lib:util",
"//src/main/java/com/google/devtools/build/lib:vfs",
"//src/main/java/com/google/devtools/build/lib/authandtls",
"//src/main/java/com/google/devtools/build/lib/buildeventservice/client",
"//src/main/java/com/google/devtools/build/lib/buildeventstream",
"//src/main/java/com/google/devtools/build/lib/buildeventstream/proto:build_event_stream_java_proto",
"//src/main/java/com/google/devtools/build/lib/buildeventstream/transports",
"//src/main/java/com/google/devtools/common/options",
"//third_party:guava",
"//third_party:jsr305",
"//third_party/grpc:grpc-jar",
"@com_google_protobuf//:protobuf_java",
"@com_google_protobuf//:protobuf_java_util",
"@com_google_protobuf//:well_known_types_any_proto",
"@googleapis//:google_devtools_build_v1_build_events_java_proto",
"@googleapis//:google_devtools_build_v1_build_status_java_proto",
"@googleapis//:google_devtools_build_v1_publish_build_event_java_proto",
],
)
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package(default_visibility = ["//src:__subpackages__"])

filegroup(
name = "srcs",
srcs = glob(["**"]),
visibility = ["//src/main/java/com/google/devtools/build/lib:__pkg__"],
)

java_library(
name = "client",
srcs = glob(["*.java"]),
visibility = [
"//src/main/java/com/google/devtools/build/lib:__pkg__",
"//src/test/java/com/google/devtools/build/lib/buildeventservice:__pkg__",
],
runtime_deps = [
# This is required for client TLS.
"//third_party:netty_tcnative",
Expand Down
22 changes: 22 additions & 0 deletions src/main/java/com/google/devtools/build/lib/buildeventstream/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package(default_visibility = ["//src:__subpackages__"])

# External build-event reporting infrastructure
java_library(
name = "buildeventstream",
srcs = glob(["*.java"]),
deps = [
"//src/main/java/com/google/devtools/build/lib:events",
"//src/main/java/com/google/devtools/build/lib:vfs",
"//src/main/java/com/google/devtools/build/lib/buildeventstream/proto:build_event_stream_java_proto",
"//src/main/java/com/google/devtools/build/lib/causes",
"//src/main/java/com/google/devtools/build/lib/cmdline",
"//third_party:guava",
"//third_party:jsr305",
"//third_party/protobuf:protobuf_java",
],
)

filegroup(
name = "srcs",
srcs = glob(["**"]),
)
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ java_library(
name = "transports",
srcs = glob(["*.java"]),
deps = [
"//src/main/java/com/google/devtools/build/lib:buildeventstream",
"//src/main/java/com/google/devtools/build/lib:vfs",
"//src/main/java/com/google/devtools/build/lib/buildeventstream",
"//src/main/java/com/google/devtools/build/lib/buildeventstream/proto:build_event_stream_java_proto",
"//src/main/java/com/google/devtools/common/options",
"//third_party:guava",
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/google/devtools/build/lib/remote/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ java_library(
"//third_party:netty_tcnative",
],
deps = [
"//src/main/java/com/google/devtools/build/lib:auth_and_tls_options",
"//src/main/java/com/google/devtools/build/lib:build-base",
"//src/main/java/com/google/devtools/build/lib:buildeventstream",
"//src/main/java/com/google/devtools/build/lib:concurrent",
"//src/main/java/com/google/devtools/build/lib:events",
"//src/main/java/com/google/devtools/build/lib:io",
Expand All @@ -22,6 +20,8 @@ java_library(
"//src/main/java/com/google/devtools/build/lib:util",
"//src/main/java/com/google/devtools/build/lib:vfs",
"//src/main/java/com/google/devtools/build/lib/actions",
"//src/main/java/com/google/devtools/build/lib/authandtls",
"//src/main/java/com/google/devtools/build/lib/buildeventstream",
"//src/main/java/com/google/devtools/build/lib/exec/apple",
"//src/main/java/com/google/devtools/build/lib/exec/local",
"//src/main/java/com/google/devtools/build/lib/standalone",
Expand Down
12 changes: 5 additions & 7 deletions src/main/java/com/google/devtools/build/lib/shell/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package(
default_visibility = ["//src:__subpackages__"],
package(default_visibility = ["//src:__subpackages__"])

filegroup(
name = "srcs",
srcs = glob(["**"]),
)

# Library for dealing with executable commands, including their arguments and runtime environment
Expand All @@ -23,8 +26,3 @@ bootstrap_java_library(
srcs = glob(["*.java"]),
jars = ["//third_party:bootstrap_guava_and_error_prone-jars"],
)

filegroup(
name = "srcs",
srcs = glob(["**"]),
)
4 changes: 2 additions & 2 deletions src/test/java/com/google/devtools/build/lib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,6 @@ java_test(
":testutil",
"//src/main/java/com/google/devtools/build/lib:bazel-rules",
"//src/main/java/com/google/devtools/build/lib:build-base",
"//src/main/java/com/google/devtools/build/lib:buildeventstream",
"//src/main/java/com/google/devtools/build/lib:clock",
"//src/main/java/com/google/devtools/build/lib:inmemoryfs",
"//src/main/java/com/google/devtools/build/lib:io",
Expand All @@ -1057,6 +1056,7 @@ java_test(
"//src/main/java/com/google/devtools/build/lib:vfs",
"//src/main/java/com/google/devtools/build/lib/actions",
"//src/main/java/com/google/devtools/build/lib/bazel/repository/downloader",
"//src/main/java/com/google/devtools/build/lib/buildeventstream",
"//src/main/java/com/google/devtools/build/lib/buildeventstream/proto:build_event_stream_java_proto",
"//src/main/java/com/google/devtools/build/lib/buildeventstream/transports",
"//src/main/java/com/google/devtools/common/options",
Expand All @@ -1079,7 +1079,6 @@ java_test(
":foundations_testutil",
":test_runner",
":testutil",
"//src/main/java/com/google/devtools/build/lib:auth_and_tls_options",
"//src/main/java/com/google/devtools/build/lib:build-base",
"//src/main/java/com/google/devtools/build/lib:events",
"//src/main/java/com/google/devtools/build/lib:exitcode-external",
Expand All @@ -1088,6 +1087,7 @@ java_test(
"//src/main/java/com/google/devtools/build/lib:preconditions",
"//src/main/java/com/google/devtools/build/lib:vfs",
"//src/main/java/com/google/devtools/build/lib/actions",
"//src/main/java/com/google/devtools/build/lib/authandtls",
"//src/main/java/com/google/devtools/build/lib/remote",
"//src/main/java/com/google/devtools/common/options",
"//third_party:api_client",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ java_test(
test_class = "com.google.devtools.build.lib.AllTests",
runtime_deps = ["//src/test/java/com/google/devtools/build/lib:test_runner"],
deps = [
"//src/main/java/com/google/devtools/build/lib:auth_and_tls_options",
"//src/main/java/com/google/devtools/build/lib:buildeventservice",
"//src/main/java/com/google/devtools/build/lib:buildeventstream",
"//src/main/java/com/google/devtools/build/lib:clock",
"//src/main/java/com/google/devtools/build/lib:events",
"//src/main/java/com/google/devtools/build/lib:runtime",
"//src/main/java/com/google/devtools/build/lib:vfs",
"//src/main/java/com/google/devtools/build/lib/authandtls",
"//src/main/java/com/google/devtools/build/lib/buildeventservice",
"//src/main/java/com/google/devtools/build/lib/buildeventstream",
"//src/main/java/com/google/devtools/build/lib/buildeventstream/transports",
"//src/main/java/com/google/devtools/common/options",
"//src/test/java/com/google/devtools/build/lib:testutil",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ java_test(
test_class = "com.google.devtools.build.lib.AllTests",
runtime_deps = ["//src/test/java/com/google/devtools/build/lib:test_runner"],
deps = [
"//src/main/java/com/google/devtools/build/lib:buildeventstream",
"//src/main/java/com/google/devtools/build/lib:runtime",
"//src/main/java/com/google/devtools/build/lib:vfs",
"//src/main/java/com/google/devtools/build/lib/buildeventstream",
"//src/main/java/com/google/devtools/build/lib/buildeventstream/proto:build_event_stream_java_proto",
"//src/main/java/com/google/devtools/build/lib/buildeventstream/transports",
"//src/test/java/com/google/devtools/build/lib:packages_testutil",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ java_library(
resources = ["//src/main/tools:linux-sandbox"],
visibility = ["//src/tools/remote_worker:__subpackages__"],
deps = [
"//src/main/java/com/google/devtools/build/lib:auth_and_tls_options",
"//src/main/java/com/google/devtools/build/lib:build-base",
"//src/main/java/com/google/devtools/build/lib:concurrent",
"//src/main/java/com/google/devtools/build/lib:events",
Expand All @@ -25,6 +24,7 @@ java_library(
"//src/main/java/com/google/devtools/build/lib:util",
"//src/main/java/com/google/devtools/build/lib:vfs",
"//src/main/java/com/google/devtools/build/lib/actions",
"//src/main/java/com/google/devtools/build/lib/authandtls",
"//src/main/java/com/google/devtools/build/lib/remote",
"//src/main/java/com/google/devtools/build/lib/shell",
"//src/main/java/com/google/devtools/common/options",
Expand Down

0 comments on commit a94ef48

Please sign in to comment.