xref: /aosp_15_r20/external/skia/resources/BUILD.bazel (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1load("//bazel:skia_rules.bzl", "skia_filegroup")
2
3# We export a known file inside the resources directory so that we can compute a path to said
4# directory from places that support "Make" variables[1], such as the "cmd" attribute[2] of a
5# genrule. For example, a genrule can compute the path to the resources directory from its "cmd"
6# attribute as follows:
7#
8#     $$(dirname $$(rootpath //resources:README))
9#
10# [1] https://bazel.build/reference/be/make-variables
11# [2] https://bazel.build/reference/be/general#genrule.cmd
12exports_files(
13    ["README"],
14    visibility = [
15        "//bench:__pkg__",
16        "//gm:__pkg__",
17        "//tests:__pkg__",
18    ],
19)
20
21skia_filegroup(
22    name = "resources",
23    srcs = [
24        "Cowboy.svg",
25        "crbug769134.fil",
26        "diff_canvas_traces/lorem_ipsum.trace",
27        "nov-talk-sequence.txt",
28        "pdf_command_stream.txt",
29        "//resources/sksl",
30    ] + glob(
31        [
32            "android_fonts/**",
33        ],
34        allow_empty = False,
35    ) + glob(
36        [
37            "empty_images/**",
38        ],
39        allow_empty = False,
40    ) + glob(
41        [
42            "fonts/**",
43        ],
44        allow_empty = False,
45    ) + glob(
46        [
47            "icc_profiles/**",
48        ],
49        allow_empty = False,
50    ) + glob(
51        [
52            "images/**",
53        ],
54        allow_empty = False,
55    ) + glob(
56        [
57            "invalid_images/**",
58        ],
59        allow_empty = False,
60    ) + glob(
61        [
62            "rivs/**",
63        ],
64        allow_empty = False,
65    ) + glob(
66        [
67            "skottie/**",
68        ],
69        allow_empty = False,
70    ) + glob(
71        [
72            "text/**",
73        ],
74        allow_empty = False,
75    ),
76    visibility = [
77        "//bench:__pkg__",
78        "//dm:__pkg__",
79        "//gm:__pkg__",
80        "//src/ports/fontations:__pkg__",
81        "//tests:__pkg__",
82        "//tools/viewer:__pkg__",
83    ],
84)
85
86filegroup(
87    name = "core_test_resources",
88    srcs = [
89        "images/baby_tux.png",
90        "images/baby_tux.webp",
91    ],
92    visibility = [
93        "//tests:__pkg__",
94    ],
95)
96