• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// 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
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 "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
24cc_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: [
52        "//packages/modules/adb:__subpackages__",
53
54        // This needs to be visible to minadbd, even though it's removed via exclude_shared_libs.
55        "//bootable/recovery/minadbd:__subpackages__",
56    ],
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
68    min_sdk_version: "30",
69    apex_available: ["com.android.adbd"],
70}
71
72// For running atest (b/147158681)
73cc_library_static {
74    name: "libadb_protos_static",
75    defaults: ["libadb_protos_defaults"],
76
77    apex_available: [
78        "//apex_available:platform",
79    ],
80}
81
82cc_defaults {
83    name: "libapp_processes_protos_defaults",
84    cflags: [
85        "-Wall",
86        "-Wextra",
87        "-Wthread-safety",
88        "-Werror",
89    ],
90
91    compile_multilib: "both",
92
93    srcs: [
94        "app_processes.proto",
95    ],
96    target: {
97        windows: {
98            compile_multilib: "first",
99            enabled: true,
100        },
101    },
102
103    visibility: [
104        "//packages/modules/adb:__subpackages__",
105
106        // This needs to be visible to minadbd, even though it's removed via exclude_shared_libs.
107        "//bootable/recovery/minadbd:__subpackages__",
108    ],
109
110    stl: "libc++_static",
111
112    apex_available: ["com.android.adbd"],
113}
114
115cc_library {
116    name: "libapp_processes_protos_lite",
117    defaults: ["libapp_processes_protos_defaults"],
118
119    min_sdk_version: "30",
120    apex_available: ["//apex_available:platform"],
121
122    proto: {
123        export_proto_headers: true,
124        type: "lite",
125    },
126
127    host_supported: true,
128    recovery_available: true,
129}
130
131cc_library_host_static {
132    name: "libapp_processes_protos_full",
133    defaults: ["libapp_processes_protos_defaults"],
134
135    proto: {
136        export_proto_headers: true,
137        type: "full",
138    },
139}
140
141cc_defaults {
142    name: "adb_host_protos_defaults",
143    cflags: [
144        "-Wall",
145        "-Wextra",
146        "-Wthread-safety",
147        "-Werror",
148    ],
149
150    compile_multilib: "both",
151
152    srcs: [
153        ":adb_host_proto",
154    ],
155    target: {
156        windows: {
157            compile_multilib: "first",
158            enabled: true,
159        },
160    },
161
162    visibility: [
163        "//packages/modules/adb:__subpackages__",
164    ],
165
166    stl: "libc++_static",
167
168    apex_available: ["com.android.adbd"],
169}
170
171cc_library_host_static {
172    name: "libadb_host_protos",
173    defaults: ["adb_host_protos_defaults"],
174    static_libs: [
175        "libprotobuf-cpp-full",
176    ],
177
178    proto: {
179        export_proto_headers: true,
180        type: "full",
181    },
182}
183
184filegroup {
185    name: "adb_host_proto",
186    srcs: [
187        "adb_host.proto",
188    ],
189    visibility: [
190        "//packages/modules/adb:__subpackages__",
191        "//tools/asuite",
192    ],
193}
194