Skip to content

Commit

Permalink
Pass visibility from jetify_{aar,jvm}_import to jetify
Browse files Browse the repository at this point in the history
  • Loading branch information
dmivankov committed Jan 5, 2022
1 parent b57640b commit fbe093a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions private/rules/jetifier.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ jetify = rule(
implementation = _jetify_impl,
)

def jetify_aar_import(name, aar, _aar_import=None, **kwargs):
def jetify_aar_import(name, aar, _aar_import=None, visibility=None, **kwargs):
jetify(
name = "jetified_" + name,
srcs = [aar],
visibility = visibility,
)

if not _aar_import:
Expand All @@ -49,18 +50,21 @@ def jetify_aar_import(name, aar, _aar_import=None, **kwargs):
_aar_import(
name = name,
aar = ":jetified_" + name,
visibility = visibility,
**kwargs
)

def jetify_jvm_import(name, jars, **kwargs):
def jetify_jvm_import(name, jars, visibility=None, **kwargs):
jetify(
name = "jetified_" + name,
srcs = jars,
visibility = visibility,
)

jvm_import(
name = name,
jars = [":jetified_" + name],
visibility = visibility,
**kwargs
)

Expand Down

0 comments on commit fbe093a

Please sign in to comment.