Add cfg "host" for j2cl_library plugin attributes.
This ensures that plugins are ignored for license collection.
Patch also further restricts allowed labels to only java_plugin rules.
@@ -60,8 +60,8 @@ _J2CL_LIB_ATTRS = {
"srcs": attr.label_list(allow_files = [".java", ".js", ".srcjar", ".jar", ".zip"]),
"deps": attr.label_list(providers = [JS_PROVIDER_NAME]),
"exports": attr.label_list(providers = [JS_PROVIDER_NAME]),
- "plugins": attr.label_list(providers = [JavaInfo]),
- "exported_plugins": attr.label_list(providers = [JavaInfo]),
+ "plugins": attr.label_list(allow_rules = ["java_plugin"], cfg = "host"),
+ "exported_plugins": attr.label_list(allow_rules = ["java_plugin"], cfg = "host"),
"javacopts": attr.string_list(),
}
_J2CL_LIB_ATTRS.update(_J2CL_INTERNAL_LIB_ATTRS)
