File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ load("@prelude//toolchains:ocaml.bzl", "system_ocaml_toolchain")
18
18
load ("@prelude//toolchains:python.bzl" , "system_python_bootstrap_toolchain" , "system_python_toolchain" )
19
19
load ("@prelude//toolchains:remote_test_execution.bzl" , "remote_test_execution_toolchain" )
20
20
load ("@prelude//toolchains:rust.bzl" , "system_rust_toolchain" )
21
+ load ("@prelude//toolchains:zip_file.bzl" , "zip_file_toolchain" )
21
22
22
23
def system_demo_toolchains ():
23
24
"""
@@ -158,3 +159,8 @@ def system_demo_toolchains():
158
159
name = "test" ,
159
160
visibility = ["PUBLIC" ],
160
161
)
162
+
163
+ zip_file_toolchain (
164
+ name = "zip_file" ,
165
+ visibility = ["PUBLIC" ],
166
+ )
Original file line number Diff line number Diff line change
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under both the MIT license found in the
4
+ # LICENSE-MIT file in the root directory of this source tree and the Apache
5
+ # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6
+ # of this source tree.
7
+
8
+ load ("@prelude//zip_file:zip_file_toolchain.bzl" , "ZipFileToolchainInfo" )
9
+
10
+ def zip_file_toolchain (name , ** kwargs ):
11
+ kwargs ["create_zip" ] = "prelude//toolchains/android/src/com/facebook/buck/features/zip/rules/utils:zip_binary"
12
+
13
+ _zip_file_toolchain_rule (
14
+ name = name ,
15
+ ** kwargs
16
+ )
17
+
18
+ def _zip_file_toolchain_rule_impl (ctx ):
19
+ return [
20
+ DefaultInfo (),
21
+ ZipFileToolchainInfo (
22
+ create_zip = ctx .attrs .create_zip [RunInfo ],
23
+ ),
24
+ ]
25
+
26
+ _zip_file_toolchain_rule = rule (
27
+ attrs = {
28
+ "create_zip" : attrs .dep (providers = [RunInfo ]),
29
+ },
30
+ impl = _zip_file_toolchain_rule_impl ,
31
+ is_toolchain_rule = True ,
32
+ )
You can’t perform that action at this time.
0 commit comments