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 36cc_library_static { 37 name: "libupdate_verifier", 38 39 defaults: [ 40 "update_verifier_defaults", 41 ], 42 43 srcs: [ 44 "care_map.proto", 45 "update_verifier.cpp", 46 ], 47 48 export_include_dirs: [ 49 "include", 50 ], 51 52 static_libs: [ 53 "libotautil", 54 "libvold_binder", 55 ], 56 57 shared_libs: [ 58 "android.hardware.boot@1.0", 59 "libbase", 60 "libcutils", 61 "libbinder", 62 "libutils", 63 ], 64 65 proto: { 66 type: "lite", 67 export_proto_headers: true, 68 }, 69} 70 71cc_binary { 72 name: "update_verifier", 73 74 defaults: [ 75 "update_verifier_defaults", 76 ], 77 78 srcs: [ 79 "update_verifier_main.cpp", 80 ], 81 82 static_libs: [ 83 "libupdate_verifier", 84 "libotautil", 85 "libvold_binder", 86 ], 87 88 shared_libs: [ 89 "android.hardware.boot@1.0", 90 "libbase", 91 "libcutils", 92 "libhardware", 93 "libhidlbase", 94 "liblog", 95 "libprotobuf-cpp-lite", 96 "libbinder", 97 "libutils", 98 ], 99 100 init_rc: [ 101 "update_verifier.rc", 102 ], 103} 104 105python_binary_host { 106 name: "care_map_generator", 107 108 srcs: [ 109 "care_map_generator.py", 110 "care_map.proto", 111 ], 112 libs: [ 113 "python-symbol", 114 // Soong won't add "libprotobuf-python" to the dependencies if 115 // filegroup contains .proto files. So add it here explicitly. 116 "libprotobuf-python", 117 ], 118 proto: { 119 canonical_path_from_root: false, 120 }, 121 122 version: { 123 py2: { 124 enabled: false, 125 embedded_launcher: false, 126 }, 127 py3: { 128 enabled: true, 129 embedded_launcher: true, 130 }, 131 }, 132} 133