xref: /aosp_15_r20/build/bazel/scripts/difftool/BUILD.bazel (revision 7594170e27e0732bc44b93d1440d87a54b6ffe7c)
1# Copyright (C) 2022 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#   http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15filegroup(
16    name = "collect_zip",
17    srcs = [":collect"],
18    output_group = "python_zip_file",
19)
20
21py_binary(
22    name = "collect",
23    srcs = ["collect.py"],
24    imports = ["."],
25    python_version = "PY3",
26)
27
28filegroup(
29    name = "difftool_zip",
30    srcs = [":difftool"],
31    output_group = "python_zip_file",
32)
33
34py_library(
35    name = "difftool_commands",
36    srcs = [
37        "clangcompile.py",
38        "commands.py",
39    ],
40    deps = [
41        "//build/bazel/scripts/difftool/diffs",
42    ],
43)
44
45py_test(
46    name = "difftool_test",
47    srcs = ["difftool_test.py"],
48    deps = [
49        ":collect",
50        ":difftool",
51    ],
52)
53
54py_binary(
55    name = "difftool",
56    srcs = ["difftool.py"],
57    python_version = "PY3",
58    deps = [
59        ":collect",
60        ":difftool_commands",
61    ],
62)
63