mirror of
https://github.com/bazel-contrib/bazel-lib
synced 2024-12-03 11:52:43 +00:00
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],
|
|
)
|