blob: 220b007f5f1ae8659f4c655481db1b0aac56260d [file] [log] [blame]
Tao Baoafb9fc22018-04-19 14:49:32 -07001// 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
Bob Badour29be3f62021-02-12 18:00:57 -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 "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
Tao Baoafb9fc22018-04-19 14:49:32 -070024cc_defaults {
25 name: "update_verifier_defaults",
26
Tianjie Xu446b64b2018-09-19 15:45:28 -070027 defaults: [
28 "recovery_defaults",
Tao Baoafb9fc22018-04-19 14:49:32 -070029 ],
30
31 local_include_dirs: [
32 "include",
33 ],
34}
35
Kelvin Zhangb4b619c2021-06-03 09:33:55 -040036python_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
Tao Baoafb9fc22018-04-19 14:49:32 -070055cc_library_static {
56 name: "libupdate_verifier",
57
58 defaults: [
59 "update_verifier_defaults",
60 ],
61
62 srcs: [
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070063 "care_map.proto",
Tao Baoafb9fc22018-04-19 14:49:32 -070064 "update_verifier.cpp",
65 ],
66
67 export_include_dirs: [
68 "include",
69 ],
70
71 static_libs: [
72 "libotautil",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -080073 "libvold_binder",
Tao Baoafb9fc22018-04-19 14:49:32 -070074 ],
75
76 shared_libs: [
77 "android.hardware.boot@1.0",
78 "libbase",
79 "libcutils",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -080080 "libbinder",
81 "libutils",
Tao Baoafb9fc22018-04-19 14:49:32 -070082 ],
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070083
84 proto: {
85 type: "lite",
86 export_proto_headers: true,
Tianjie Xu7e520d22018-08-13 16:41:30 -070087 },
Tao Baoafb9fc22018-04-19 14:49:32 -070088}
89
90cc_binary {
91 name: "update_verifier",
92
93 defaults: [
94 "update_verifier_defaults",
95 ],
96
97 srcs: [
98 "update_verifier_main.cpp",
99 ],
100
101 static_libs: [
102 "libupdate_verifier",
103 "libotautil",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -0800104 "libvold_binder",
Tao Baoafb9fc22018-04-19 14:49:32 -0700105 ],
106
107 shared_libs: [
108 "android.hardware.boot@1.0",
109 "libbase",
110 "libcutils",
111 "libhardware",
112 "libhidlbase",
113 "liblog",
Tianjie Xu4d9e62d2018-05-11 10:41:44 -0700114 "libprotobuf-cpp-lite",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -0800115 "libbinder",
Tao Baoafb9fc22018-04-19 14:49:32 -0700116 "libutils",
117 ],
118
119 init_rc: [
120 "update_verifier.rc",
121 ],
122}
Tianjie Xu7e520d22018-08-13 16:41:30 -0700123
124python_binary_host {
125 name: "care_map_generator",
126
127 srcs: [
128 "care_map_generator.py",
129 "care_map.proto",
130 ],
131 libs: [
132 "python-symbol",
133 // Soong won't add "libprotobuf-python" to the dependencies if
134 // filegroup contains .proto files. So add it here explicitly.
135 "libprotobuf-python",
136 ],
137 proto: {
138 canonical_path_from_root: false,
139 },
140
141 version: {
142 py2: {
Tianjie Xu7e520d22018-08-13 16:41:30 -0700143 enabled: false,
144 embedded_launcher: false,
145 },
Krzysztof KosiƄski9c857f82021-02-24 16:02:25 -0800146 py3: {
147 enabled: true,
148 embedded_launcher: true,
149 },
Tianjie Xu7e520d22018-08-13 16:41:30 -0700150 },
151}