Pass on visibility for distrib_java_import rule
RELNOTES: None
load("@rules_java//java:defs.bzl", _java_import = "java_import")
-def distrib_java_import(name, enable_distributions = [], **kwargs):
+def distrib_java_import(name, visibility = None, enable_distributions = [], **kwargs):
"""A macro for java_import rule to support distributions build (eg. Debian)"""
checked_in_name = name + "_checked_in"
- _java_import(name = checked_in_name, **kwargs)
+ _java_import(name = checked_in_name, visibility = visibility, **kwargs)
conditions = {
"//conditions:default": ":" + checked_in_name,
@@ -27,4 +27,4 @@ def distrib_java_import(name, enable_distributions = [], **kwargs):
if "debian" in enable_distributions:
conditions["//src/conditions:debian_build"] = "@debian_java_deps//:" + name
- native.alias(name = name, actual = select(conditions))
+ native.alias(name = name, actual = select(conditions), visibility = visibility)
