1// Copyright (C) 2018 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 "bootable_recovery_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: ["bootable_recovery_license"], 22} 23 24cc_defaults { 25 name: "update_verifier_defaults", 26 27 defaults: [ 28 "recovery_defaults", 29 ], 30 31 local_include_dirs: [ 32 "include", 33 ], 34} 35 36python_library_host { 37 name: "care_map_proto_py", 38 srcs: [ 39 "care_map.proto", 40 ], 41 proto: {type: "lite", canonical_path_from_root: false}, 42 version: { 43 py2: { 44 enabled: true, 45 }, 46 py3: { 47 enabled: true, 48 }, 49 }, 50 visibility: [ 51 "//build/make/tools/releasetools:__subpackages__", 52 ], 53} 54 55cc_library_static { 56 name: "libupdate_verifier", 57 58 defaults: [ 59 "update_verifier_defaults", 60 ], 61 62 srcs: [ 63 "care_map.proto", 64 "update_verifier.cpp", 65 ], 66 67 export_include_dirs: [ 68 "include", 69 ], 70 71 static_libs: [ 72 "libotautil", 73 "libvold_binder", 74 ], 75 76 whole_static_libs: [ 77 "libsnapshot_snapuserd", 78 ], 79 80 shared_libs: [ 81 "android.hardware.boot@1.0", 82 "libbase", 83 "libcutils", 84 "libbinder", 85 "libutils", 86 ], 87 88 proto: { 89 type: "lite", 90 export_proto_headers: true, 91 }, 92} 93 94cc_binary { 95 name: "update_verifier", 96 97 defaults: [ 98 "update_verifier_defaults", 99 ], 100 101 srcs: [ 102 "update_verifier_main.cpp", 103 ], 104 105 static_libs: [ 106 "libupdate_verifier", 107 "libotautil", 108 "libvold_binder", 109 ], 110 111 shared_libs: [ 112 "android.hardware.boot@1.0", 113 "libbase", 114 "libcutils", 115 "libhardware", 116 "libhidlbase", 117 "liblog", 118 "libprotobuf-cpp-lite", 119 "libbinder", 120 "libutils", 121 ], 122 123 init_rc: [ 124 "update_verifier.rc", 125 ], 126} 127 128python_binary_host { 129 name: "care_map_generator", 130 131 srcs: [ 132 "care_map_generator.py", 133 "care_map.proto", 134 ], 135 libs: [ 136 "python-symbol", 137 // Soong won't add "libprotobuf-python" to the dependencies if 138 // filegroup contains .proto files. So add it here explicitly. 139 "libprotobuf-python", 140 ], 141 proto: { 142 canonical_path_from_root: false, 143 }, 144 145 version: { 146 py2: { 147 enabled: false, 148 embedded_launcher: false, 149 }, 150 py3: { 151 enabled: true, 152 embedded_launcher: true, 153 }, 154 }, 155} 156