mirror of
https://github.com/bazel-contrib/bazel-lib
synced 2024-11-30 01:41:21 +00:00
23 lines
475 B
Python
23 lines
475 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 _lib_impl(ctx):
|
|
return [
|
|
DefaultInfo(files = depset(ctx.files.srcs)),
|
|
OtherInfo(files = depset(ctx.files.others)),
|
|
]
|
|
|
|
lib = rule(
|
|
implementation = _lib_impl,
|
|
attrs = _attrs,
|
|
provides = [DefaultInfo, OtherInfo],
|
|
)
|