You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
376 B
12 lines
376 B
def _wrap_json_properties_impl(ctx):
|
|
content = ctx.read(ctx.attr.src)
|
|
bzl = "PROPERTIES = %s" % (content)
|
|
ctx.file("BUILD", content = "", executable = False)
|
|
ctx.file("properties.bzl", content = bzl, executable = False)
|
|
|
|
wrap_json_properties = repository_rule(
|
|
attrs = {
|
|
"src": attr.label(mandatory = True),
|
|
},
|
|
implementation = _wrap_json_properties_impl,
|
|
)
|
|
|