From 26c6f1de861b45a265546203dd604fc31d79e650 Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Wed, 29 Jun 2022 12:10:09 +0100 Subject: [PATCH] Allow setting visibility for java_test_suite libraries (#44) Currently, there is no way for other packages to depend on the implicitly generated test library. This allows for a BUILD file author to opt in to making the generated test library more visible. This re-uses the visibility attribute which is also currently used for the visibility of the generated `test_suite`. This feels less fiddly than introducing a separate attribute. --- java/private/create_jvm_test_suite.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/java/private/create_jvm_test_suite.bzl b/java/private/create_jvm_test_suite.bzl index 608cd1b0..400085c7 100644 --- a/java/private/create_jvm_test_suite.bzl +++ b/java/private/create_jvm_test_suite.bzl @@ -81,6 +81,7 @@ def create_jvm_test_suite( deps = deps, srcs = nontest_srcs, testonly = True, + visibility = visibility, **library_attrs ) deps.append(":%s-test-lib" % name)