aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Männich <maennich@google.com>2024-03-22 13:35:52 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-03-22 13:35:52 +0000
commit9c6d27060d6808fc1f2a203ff311319641285ec7 (patch)
tree1dcb6b9e98c35e5b167e411e4724e6726eae64b0
parentdea7500c20c656dcf2feb34d5583b636af798bef (diff)
parent0aac592ad95279237f9caa55945a69ace447606e (diff)
downloadbazel_common_rules-9c6d27060d6808fc1f2a203ff311319641285ec7.tar.gz
Merge "Revert^2 "Remove unused zip.bzl"" into main
-rw-r--r--zip/BUILD13
-rw-r--r--zip/zip.bzl53
2 files changed, 0 insertions, 66 deletions
diff --git a/zip/BUILD b/zip/BUILD
deleted file mode 100644
index 3b1f000..0000000
--- a/zip/BUILD
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright (C) 2023 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
diff --git a/zip/zip.bzl b/zip/zip.bzl
deleted file mode 100644
index 3dee689..0000000
--- a/zip/zip.bzl
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright (C) 2023 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Creates a zip archive from the specified targets."""
-
-def _zip_archive_impl(ctx):
- out_filename = ctx.attr.out if ctx.attr.out else ctx.attr.name + ".zip"
- out = ctx.actions.declare_file(out_filename)
- srcs_depset = depset(transitive = [target.files for target in ctx.attr.srcs])
-
- args = ctx.actions.args()
- args.add("-symlinks=false")
- args.add("-o", out)
- args.add_all(srcs_depset, before_each = "-f")
-
- ctx.actions.run(
- inputs = srcs_depset,
- outputs = [out],
- executable = ctx.executable._soong_zip,
- arguments = [args],
- mnemonic = "Zip",
- progress_message = "Zipping %s" % (out_filename),
- )
- return [DefaultInfo(files = depset([out]))]
-
-zip_archive = rule(
- implementation = _zip_archive_impl,
- doc = "A rule to create a zip archive from specified targets",
- attrs = {
- "srcs": attr.label_list(
- mandatory = True,
- allow_files = True,
- doc = "the targets with outputs to put in the generated archive",
- ),
- "out": attr.string(doc = "the output file name. Will use basename+\".zip\" if not specified"),
- "_soong_zip": attr.label(
- default = "//prebuilts/build-tools:soong_zip",
- executable = True,
- cfg = "exec",
- ),
- },
-)