From bd8d6a8b016c56e0d6589d81c3bb2d3b6ca2b643 Mon Sep 17 00:00:00 2001 From: Googler Date: Thu, 25 Jan 2024 06:32:32 -0800 Subject: [PATCH] [7.1.0] Harmonize BUILD files. PiperOrigin-RevId: 601430837 Change-Id: Ie7739e2e4aead81a8a3ab7d9eedf47294ed9f855 --- src/tools/execlog/BUILD | 7 ++++++- .../java/com/google/devtools/build/execlog/BUILD | 8 ++++++-- .../java/com/google/devtools/build/execlog/BUILD | 15 +++++++-------- src/tools/workspacelog/BUILD | 7 ++++++- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/tools/execlog/BUILD b/src/tools/execlog/BUILD index f5612c61973d02..17eea8626d4de2 100644 --- a/src/tools/execlog/BUILD +++ b/src/tools/execlog/BUILD @@ -1,12 +1,17 @@ load("@rules_java//java:defs.bzl", "java_binary") +package( + default_applicable_licenses = ["//:license"], + default_visibility = ["//:__pkg__"], +) + filegroup( name = "srcs", srcs = glob(["**"]) + [ "//src/tools/execlog/src/main/java/com/google/devtools/build/execlog:srcs", "//src/tools/execlog/test/main/java/com/google/devtools/build/execlog:srcs", ], - visibility = ["//src:__pkg__"], + visibility = ["//src:__subpackages__"], ) java_binary( diff --git a/src/tools/execlog/src/main/java/com/google/devtools/build/execlog/BUILD b/src/tools/execlog/src/main/java/com/google/devtools/build/execlog/BUILD index 38ba7a1b931aa2..f1018b399e0910 100644 --- a/src/tools/execlog/src/main/java/com/google/devtools/build/execlog/BUILD +++ b/src/tools/execlog/src/main/java/com/google/devtools/build/execlog/BUILD @@ -1,15 +1,19 @@ load("@rules_java//java:defs.bzl", "java_library") +package( + default_applicable_licenses = ["//:license"], + default_visibility = ["//:__subpackages__"], +) + filegroup( name = "srcs", srcs = glob(["**"]), - visibility = ["//src/tools/execlog:__pkg__"], + visibility = ["//src:__subpackages__"], ) java_library( name = "parser", srcs = glob(["*.java"]), - visibility = ["//src/tools/execlog:__subpackages__"], deps = [ "//src/main/java/com/google/devtools/common/options", "//src/main/protobuf:spawn_java_proto", diff --git a/src/tools/execlog/test/main/java/com/google/devtools/build/execlog/BUILD b/src/tools/execlog/test/main/java/com/google/devtools/build/execlog/BUILD index b58c033bdf057c..0ca42a0e092b0a 100644 --- a/src/tools/execlog/test/main/java/com/google/devtools/build/execlog/BUILD +++ b/src/tools/execlog/test/main/java/com/google/devtools/build/execlog/BUILD @@ -1,20 +1,19 @@ load("@rules_java//java:defs.bzl", "java_test") package( + default_applicable_licenses = ["//:license"], default_testonly = 1, - default_visibility = ["//src:__subpackages__"], + default_visibility = [ + "//javatests/com/google/devtools/build/lib:__subpackages__", + "//src/test/java/com/google/devtools/build/lib:__subpackages__", + ], ) filegroup( name = "srcs", testonly = 0, - srcs = glob( - ["**"], - exclude = [ - "*~", - ], - ), - visibility = ["//src/tools/execlog:__pkg__"], + srcs = glob(["**"]), + visibility = ["//src:__subpackages__"], ) java_test( diff --git a/src/tools/workspacelog/BUILD b/src/tools/workspacelog/BUILD index f6c1c6d46ece08..bc98fdd186cd87 100644 --- a/src/tools/workspacelog/BUILD +++ b/src/tools/workspacelog/BUILD @@ -1,12 +1,17 @@ load("@rules_java//java:defs.bzl", "java_binary") +package( + default_applicable_licenses = ["//:license"], + default_visibility = ["//:__pkg__"], +) + filegroup( name = "srcs", srcs = glob(["**"]) + [ "//src/tools/workspacelog/src/main/java/com/google/devtools/build/workspacelog:srcs", "//src/tools/workspacelog/test/main/java/com/google/devtools/build/workspacelog:srcs", ], - visibility = ["//src:__pkg__"], + visibility = ["//src:__subpackages__"], ) java_binary(