1// 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 15package { 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 24// An existing module name is reused to avoid merge conflicts. 25// TODO: fix the font and module name. 26filegroup { 27 name: "NotoColorEmojiTtf", 28 srcs: ["NotoColorEmoji.ttf"], 29} 30 31filegroup { 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", 48} 49 50genrule { 51 name: "UpdatableSystemFontTestNotoColorEmojiV0Ttf", 52 srcs: [":NotoColorEmojiTtf"], 53 out: ["UpdatableSystemFontTestNotoColorEmojiV0.ttf"], 54 tools: ["update_font_metadata"], 55 cmd: "$(location update_font_metadata) " + 56 "--input=$(in) " + 57 "--output=$(out) " + 58 "--revision=0", 59} 60 61genrule { 62 name: "UpdatableSystemFontTestNotoColorEmojiVPlus1Ttf", 63 srcs: [":NotoColorEmojiTtf"], 64 out: ["UpdatableSystemFontTestNotoColorEmojiVPlus1.ttf"], 65 tools: ["update_font_metadata"], 66 cmd: "$(location update_font_metadata) " + 67 "--input=$(in) " + 68 "--output=$(out) " + 69 "--revision=+1", 70} 71 72genrule { 73 name: "UpdatableSystemFontTestNotoColorEmojiVPlus2Ttf", 74 srcs: [":NotoColorEmojiTtf"], 75 out: ["UpdatableSystemFontTestNotoColorEmojiVPlus2.ttf"], 76 tools: ["update_font_metadata"], 77 cmd: "$(location update_font_metadata) " + 78 "--input=$(in) " + 79 "--output=$(out) " + 80 "--revision=+2", 81} 82 83genrule_defaults { 84 name: "updatable_system_font_sig_gen_default", 85 tools: ["fsverity"], 86 tool_files: [ 87 ":UpdatableSystemFontTestKeyPem", 88 ":UpdatableSystemFontTestCertPem", 89 ], 90 cmd: "$(location fsverity) sign $(in) $(out) " + 91 "--key=$(location :UpdatableSystemFontTestKeyPem) " + 92 "--cert=$(location :UpdatableSystemFontTestCertPem) " + 93 "> /dev/null", 94} 95 96genrule { 97 name: "UpdatableSystemFontTestNotoColorEmojiTtfFsvSig", 98 defaults: ["updatable_system_font_sig_gen_default"], 99 srcs: [":NotoColorEmojiTtf"], 100 out: ["UpdatableSystemFontTestNotoColorEmoji.ttf.fsv_sig"], 101} 102 103genrule { 104 name: "UpdatableSystemFontTestNotoColorEmojiV0TtfFsvSig", 105 defaults: ["updatable_system_font_sig_gen_default"], 106 srcs: [":UpdatableSystemFontTestNotoColorEmojiV0Ttf"], 107 out: ["UpdatableSystemFontTestNotoColorEmojiV0.ttf.fsv_sig"], 108} 109 110genrule { 111 name: "UpdatableSystemFontTestNotoColorEmojiVPlus1TtfFsvSig", 112 defaults: ["updatable_system_font_sig_gen_default"], 113 srcs: [":UpdatableSystemFontTestNotoColorEmojiVPlus1Ttf"], 114 out: ["UpdatableSystemFontTestNotoColorEmojiVPlus1.ttf.fsv_sig"], 115} 116 117genrule { 118 name: "UpdatableSystemFontTestNotoColorEmojiVPlus2TtfFsvSig", 119 defaults: ["updatable_system_font_sig_gen_default"], 120 srcs: [":UpdatableSystemFontTestNotoColorEmojiVPlus2Ttf"], 121 out: ["UpdatableSystemFontTestNotoColorEmojiVPlus2.ttf.fsv_sig"], 122} 123