23 lines
467 B
Python
23 lines
467 B
Python
"""
|
|
Test rule to create a lib with a DefaultInfo and a OtherInfo
|
|
"""
|
|
|
|
load(":other_info.bzl", "OtherInfo")
|
|
|
|
_attrs = {
|
|
"srcs": attr.label_list(allow_files = True),
|
|
"others": attr.label_list(allow_files = True),
|
|
}
|
|
|
|
def _impl(ctx):
|
|
return [
|
|
DefaultInfo(files = depset(ctx.files.srcs)),
|
|
OtherInfo(files = depset(ctx.files.others)),
|
|
]
|
|
|
|
lib = rule(
|
|
implementation = _impl,
|
|
attrs = _attrs,
|
|
provides = [DefaultInfo, OtherInfo],
|
|
)
|