blob: edb8059cb8c3ff82611d3db48395c3e900333e1f [file] [log] [blame]
Joshua Duong4fdea382020-02-07 11:04:08 -08001// Copyright (C) 2020 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 Badour4a6774b2021-02-12 19:46:09 -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 "packages_modules_adb_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["packages_modules_adb_license"],
22}
23
Joshua Duong4fdea382020-02-07 11:04:08 -080024cc_defaults {
25 name: "libadb_protos_defaults",
26 cflags: [
27 "-Wall",
28 "-Wextra",
29 "-Wthread-safety",
30 "-Werror",
31 ],
32
33 compile_multilib: "both",
34
35 proto: {
36 export_proto_headers: true,
37 type: "lite",
38 },
39 srcs: [
40 "adb_known_hosts.proto",
41 "key_type.proto",
42 "pairing.proto",
43 ],
44 target: {
45 windows: {
46 compile_multilib: "first",
47 enabled: true,
48 },
49 },
50
51 visibility: [
Baligh Uddin95e03672020-10-18 15:09:52 +000052 "//packages/modules/adb:__subpackages__",
Josh Gaodc20c2f2020-03-27 19:41:59 -070053
54 // This needs to be visible to minadbd, even though it's removed via exclude_shared_libs.
55 "//bootable/recovery/minadbd:__subpackages__",
Joshua Duong4fdea382020-02-07 11:04:08 -080056 ],
57
58 stl: "libc++_static",
59
60 host_supported: true,
61 recovery_available: true,
62}
63
64cc_library {
65 name: "libadb_protos",
66 defaults: ["libadb_protos_defaults"],
67
Jooyung Han9864dad2021-11-22 10:15:19 +090068 min_sdk_version: "30",
Joshua Duong4fdea382020-02-07 11:04:08 -080069 apex_available: [
70 "com.android.adbd",
71 "test_com.android.adbd",
72 ],
73}
74
75// For running atest (b/147158681)
76cc_library_static {
77 name: "libadb_protos_static",
78 defaults: ["libadb_protos_defaults"],
79
80 apex_available: [
81 "//apex_available:platform",
82 ],
83}
Shukang Zhou420ad552020-02-13 17:01:39 -080084
85cc_defaults {
86 name: "libapp_processes_protos_defaults",
87 cflags: [
88 "-Wall",
89 "-Wextra",
90 "-Wthread-safety",
91 "-Werror",
92 ],
93
94 compile_multilib: "both",
95
96 srcs: [
97 "app_processes.proto",
98 ],
99 target: {
100 windows: {
101 compile_multilib: "first",
102 enabled: true,
103 },
104 },
105
106 visibility: [
Baligh Uddin95e03672020-10-18 15:09:52 +0000107 "//packages/modules/adb:__subpackages__",
Josh Gaodc20c2f2020-03-27 19:41:59 -0700108
109 // This needs to be visible to minadbd, even though it's removed via exclude_shared_libs.
110 "//bootable/recovery/minadbd:__subpackages__",
Shukang Zhou420ad552020-02-13 17:01:39 -0800111 ],
112
113 stl: "libc++_static",
114
115 apex_available: [
116 "com.android.adbd",
117 "test_com.android.adbd",
118 ],
119}
120
121cc_library {
122 name: "libapp_processes_protos_lite",
123 defaults: ["libapp_processes_protos_defaults"],
124
Jooyung Han9864dad2021-11-22 10:15:19 +0900125 min_sdk_version: "30",
Shukang Zhou420ad552020-02-13 17:01:39 -0800126 apex_available: ["//apex_available:platform"],
127
128 proto: {
129 export_proto_headers: true,
130 type: "lite",
131 },
132
133 host_supported: true,
134 recovery_available: true,
135}
136
137cc_library_host_static {
138 name: "libapp_processes_protos_full",
139 defaults: ["libapp_processes_protos_defaults"],
140
141 proto: {
142 export_proto_headers: true,
143 type: "full",
144 },
145}
Fabien Sanglard3d155b62023-11-30 14:52:40 -0800146
147cc_defaults {
Fabien Sanglard05789412024-05-30 23:00:18 -0700148 name: "adb_host_protos_defaults",
Fabien Sanglard3d155b62023-11-30 14:52:40 -0800149 cflags: [
150 "-Wall",
151 "-Wextra",
152 "-Wthread-safety",
153 "-Werror",
154 ],
155
156 compile_multilib: "both",
157
158 srcs: [
Nadia Agueeva72e1ac42024-08-07 18:12:28 +0000159 ":adb_host_proto",
Fabien Sanglard3d155b62023-11-30 14:52:40 -0800160 ],
161 target: {
162 windows: {
163 compile_multilib: "first",
164 enabled: true,
165 },
166 },
167
168 visibility: [
169 "//packages/modules/adb:__subpackages__",
170 ],
171
172 stl: "libc++_static",
173
174 apex_available: [
175 "com.android.adbd",
176 "test_com.android.adbd",
177 ],
178}
179
180cc_library_host_static {
Fabien Sanglard05789412024-05-30 23:00:18 -0700181 name: "libadb_host_protos",
182 defaults: ["adb_host_protos_defaults"],
Nadia Agueeva72e1ac42024-08-07 18:12:28 +0000183 static_libs: [
184 "libprotobuf-cpp-full",
185 ],
Fabien Sanglard3d155b62023-11-30 14:52:40 -0800186
187 proto: {
188 export_proto_headers: true,
189 type: "full",
190 },
191}
Nadia Agueeva72e1ac42024-08-07 18:12:28 +0000192
193filegroup {
194 name: "adb_host_proto",
195 srcs: [
196 "adb_host.proto",
197 ],
198 visibility: [
199 "//packages/modules/adb:__subpackages__",
200 "//tools/asuite",
201 ],
202}