Skip to content

Commit

Permalink
Fix licenses error inside java_import
Browse files Browse the repository at this point in the history
Use the same logic for java_import.licenses as for the java_library.

PiperOrigin-RevId: 493290036
Change-Id: Id8f99991a711c2d0b94758afb550385629e5cbd0
  • Loading branch information
kotlaja authored and copybara-github committed Dec 6, 2022
1 parent ef37fdb commit c1de292
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/starlark/builtins_bzl/common/java/java_import.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ JAVA_IMPORT_ATTRS = merge_attrs(
allow_files = True,
),
# Additional attrs
"licenses": attr.string_list(),
"licenses": attr.license() if hasattr(attr, "license") else attr.string_list(),
"_java_toolchain_type": attr.label(default = semantics.JAVA_TOOLCHAIN_TYPE),
},
)
Expand Down

0 comments on commit c1de292

Please sign in to comment.