blob: 64b698dd0db00472d500f463ed814cf1915cbb61 [file] [log] [blame]
Kohsuke Yatohbc718222021-01-31 23:48:46 -08001// Copyright (C) 2021 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
Bob Badourd5949582021-02-23 13:18:34 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "frameworks_base_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["frameworks_base_license"],
22}
23
Kohsuke Yatoh5ef0ea12021-06-25 21:48:03 +000024// An existing module name is reused to avoid merge conflicts.
Kohsuke Yatoh5b1bac72021-07-22 18:54:46 +000025// TODO: fix the font file name.
Kohsuke Yatoh5ef0ea12021-06-25 21:48:03 +000026filegroup {
Kohsuke Yatoh5b1bac72021-07-22 18:54:46 +000027 name: "UpdatableSystemFontTest_NotoColorEmoji.ttf",
Kohsuke Yatoh5ef0ea12021-06-25 21:48:03 +000028 srcs: ["NotoColorEmoji.ttf"],
29}
30
Kohsuke Yatohbc718222021-01-31 23:48:46 -080031filegroup {
32 name: "UpdatableSystemFontTestKeyPem",
33 srcs: ["UpdatableSystemFontTestKey.pem"],
34}
35
36filegroup {
37 name: "UpdatableSystemFontTestCertPem",
38 srcs: ["UpdatableSystemFontTestCert.pem"],
39}
40
41filegroup {
42 name: "UpdatableSystemFontTestCertDer",
43 srcs: ["UpdatableSystemFontTestCert.der"],
44}
45
46genrule_defaults {
47 name: "updatable_system_font_increment_font_revision_default",
Kohsuke Yatohbd636d82021-04-08 12:54:29 -070048}
49
50genrule {
Kohsuke Yatoh865a9cb2021-05-19 11:36:23 -070051 name: "UpdatableSystemFontTest_NotoColorEmojiV0.ttf",
Kohsuke Yatoh5b1bac72021-07-22 18:54:46 +000052 srcs: [":UpdatableSystemFontTest_NotoColorEmoji.ttf"],
Kohsuke Yatoh865a9cb2021-05-19 11:36:23 -070053 out: ["UpdatableSystemFontTest_NotoColorEmojiV0.ttf"],
Kohsuke Yatohbd636d82021-04-08 12:54:29 -070054 tools: ["update_font_metadata"],
55 cmd: "$(location update_font_metadata) " +
56 "--input=$(in) " +
57 "--output=$(out) " +
58 "--revision=0",
59}
60
61genrule {
Kohsuke Yatoh865a9cb2021-05-19 11:36:23 -070062 name: "UpdatableSystemFontTest_NotoColorEmojiVPlus1.ttf",
Kohsuke Yatoh5b1bac72021-07-22 18:54:46 +000063 srcs: [":UpdatableSystemFontTest_NotoColorEmoji.ttf"],
Kohsuke Yatoh865a9cb2021-05-19 11:36:23 -070064 out: ["UpdatableSystemFontTest_NotoColorEmojiVPlus1.ttf"],
Kohsuke Yatohbc718222021-01-31 23:48:46 -080065 tools: ["update_font_metadata"],
66 cmd: "$(location update_font_metadata) " +
67 "--input=$(in) " +
68 "--output=$(out) " +
69 "--revision=+1",
70}
71
72genrule {
Kohsuke Yatoh865a9cb2021-05-19 11:36:23 -070073 name: "UpdatableSystemFontTest_NotoColorEmojiVPlus2.ttf",
Kohsuke Yatoh5b1bac72021-07-22 18:54:46 +000074 srcs: [":UpdatableSystemFontTest_NotoColorEmoji.ttf"],
Kohsuke Yatoh865a9cb2021-05-19 11:36:23 -070075 out: ["UpdatableSystemFontTest_NotoColorEmojiVPlus2.ttf"],
Kohsuke Yatohbd636d82021-04-08 12:54:29 -070076 tools: ["update_font_metadata"],
77 cmd: "$(location update_font_metadata) " +
78 "--input=$(in) " +
79 "--output=$(out) " +
80 "--revision=+2",
Kohsuke Yatohbc718222021-01-31 23:48:46 -080081}
82
83genrule_defaults {
84 name: "updatable_system_font_sig_gen_default",
85 tools: ["fsverity"],
Kohsuke Yatohbd636d82021-04-08 12:54:29 -070086 tool_files: [
87 ":UpdatableSystemFontTestKeyPem",
88 ":UpdatableSystemFontTestCertPem",
89 ],
Kohsuke Yatohbc718222021-01-31 23:48:46 -080090 cmd: "$(location fsverity) sign $(in) $(out) " +
91 "--key=$(location :UpdatableSystemFontTestKeyPem) " +
92 "--cert=$(location :UpdatableSystemFontTestCertPem) " +
93 "> /dev/null",
94}
95
96genrule {
Kohsuke Yatoh865a9cb2021-05-19 11:36:23 -070097 name: "UpdatableSystemFontTest_NotoColorEmoji.sig",
Kohsuke Yatohbc718222021-01-31 23:48:46 -080098 defaults: ["updatable_system_font_sig_gen_default"],
Kohsuke Yatoh5b1bac72021-07-22 18:54:46 +000099 srcs: [":UpdatableSystemFontTest_NotoColorEmoji.ttf"],
Kohsuke Yatoh865a9cb2021-05-19 11:36:23 -0700100 out: ["UpdatableSystemFontTest_NotoColorEmoji.sig"],
Kohsuke Yatohbc718222021-01-31 23:48:46 -0800101}
102
103genrule {
Kohsuke Yatoh865a9cb2021-05-19 11:36:23 -0700104 name: "UpdatableSystemFontTest_NotoColorEmojiV0.sig",
Kohsuke Yatohbc718222021-01-31 23:48:46 -0800105 defaults: ["updatable_system_font_sig_gen_default"],
Kohsuke Yatoh865a9cb2021-05-19 11:36:23 -0700106 srcs: [":UpdatableSystemFontTest_NotoColorEmojiV0.ttf"],
107 out: ["UpdatableSystemFontTest_NotoColorEmojiV0.sig"],
Kohsuke Yatohbc718222021-01-31 23:48:46 -0800108}
109
110genrule {
Kohsuke Yatoh865a9cb2021-05-19 11:36:23 -0700111 name: "UpdatableSystemFontTest_NotoColorEmojiVPlus1.sig",
Kohsuke Yatohbc718222021-01-31 23:48:46 -0800112 defaults: ["updatable_system_font_sig_gen_default"],
Kohsuke Yatoh865a9cb2021-05-19 11:36:23 -0700113 srcs: [":UpdatableSystemFontTest_NotoColorEmojiVPlus1.ttf"],
114 out: ["UpdatableSystemFontTest_NotoColorEmojiVPlus1.sig"],
Kohsuke Yatohbd636d82021-04-08 12:54:29 -0700115}
116
117genrule {
Kohsuke Yatoh865a9cb2021-05-19 11:36:23 -0700118 name: "UpdatableSystemFontTest_NotoColorEmojiVPlus2.sig",
Kohsuke Yatohbd636d82021-04-08 12:54:29 -0700119 defaults: ["updatable_system_font_sig_gen_default"],
Kohsuke Yatoh865a9cb2021-05-19 11:36:23 -0700120 srcs: [":UpdatableSystemFontTest_NotoColorEmojiVPlus2.ttf"],
121 out: ["UpdatableSystemFontTest_NotoColorEmojiVPlus2.sig"],
122}
123
124genrule {
125 name: "UpdatableSystemFontTest_NotoSerif-Regular.sig",
126 defaults: ["updatable_system_font_sig_gen_default"],
127 srcs: [":NotoSerif-Regular.ttf"],
128 out: ["UpdatableSystemFontTest_NotoSerif-Regular.sig"],
129}
130
131genrule {
132 name: "UpdatableSystemFontTest_NotoSerif-Bold.sig",
133 defaults: ["updatable_system_font_sig_gen_default"],
134 srcs: [":NotoSerif-Bold.ttf"],
135 out: ["UpdatableSystemFontTest_NotoSerif-Bold.sig"],
Kohsuke Yatohbc718222021-01-31 23:48:46 -0800136}