blob: 8c5c4e3988611967f760ecf3f316722651f4f331 [file] [log] [blame]
Steve Paikdd4857b2018-03-13 19:16:55 -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
15cc_library {
16 name: "libcarpowermanager",
17
18 aidl: {
19 export_aidl_headers: true,
20 local_include_dirs: [
21 "src",
22 ],
23 },
24
25 cflags: [
26 "-Wall",
27 "-Werror",
28 "-Wextra",
29 "-Wno-unused-parameter",
30 ],
31
32 include_dirs: [
33 "packages/services/Car/car-lib/native/include",
34 ],
35
36 shared_libs: [
37 "libbinder",
38 "liblog",
39 "libutils",
40 ],
41
42 srcs: [
43 "src/android/car/ICar.aidl",
44 "src/android/car/hardware/power/ICarPower.aidl",
45 "src/android/car/hardware/power/ICarPowerStateListener.aidl",
46 "native/CarPowerManager/CarPowerManager.cpp",
47 ],
48}
49
Nan Zhangf1544c22018-07-19 17:04:18 -070050java_library {
Peter Libba87152019-05-31 18:57:00 -070051 name: "android.car.cluster.navigation",
52 proto: {
53 type: "lite",
54 },
55 static_libs: ["libprotobuf-java-lite"],
56 srcs: ["src/android/car/navigation/navigation_state.proto"]
57}
58
59java_library {
Nan Zhangf1544c22018-07-19 17:04:18 -070060 name: "android.car",
61 srcs: [
62 "src/**/*.java",
63 "src_feature_future/**/*.java",
64 "src/**/I*.aidl",
65 ],
66 aidl: {
67 include_dirs: [
68 "system/bt/binder",
69 ],
70 },
71 exclude_srcs: [
72 "src/android/car/storagemonitoring/IoStats.aidl",
73 "src/android/car/storagemonitoring/IoStatsEntry.aidl",
74 ],
75 product_variables: {
76 pdk: {
77 enabled: false,
78 },
79 },
80 installable: true,
81}
Nan Zhang110f6152018-08-15 12:05:04 -070082
Tor Norbyef4c428a2019-01-04 21:03:51 -080083stubs_defaults {
Nan Zhang110f6152018-08-15 12:05:04 -070084 name: "android.car-docs-default",
85 srcs: [
86 "src/**/*.java",
87 "src_feature_future/**/*.java",
88 ],
89 libs: [
90 "android.car",
91 ],
Nan Zhang110f6152018-08-15 12:05:04 -070092 product_variables: {
93 pdk: {
94 enabled: false,
95 },
96 },
97}
98
99genrule {
100 name: "android-car-last-released-api",
101 srcs: [
102 "api/released/*.txt",
103 ],
104 cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -n | tail -1) $(genDir)/last-released-api.txt",
105 out: [
106 "last-released-api.txt",
107 ],
108}
109
110genrule {
111 name: "android-car-last-released-system-api",
112 srcs: [
113 "api/system-released/*.txt",
114 ],
115 cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -n | tail -1) $(genDir)/last-released-system-api.txt",
116 out: [
117 "last-released-system-api.txt",
118 ],
119}
120
Tor Norbyef4c428a2019-01-04 21:03:51 -0800121droidstubs {
Nan Zhang110f6152018-08-15 12:05:04 -0700122 name: "android.car-stubs-docs",
123 defaults: ["android.car-docs-default"],
124 api_tag_name: "ANDROID_CAR",
125 api_filename: "api.txt",
126 removed_api_filename: "removed.txt",
Tor Norbyea4a35ac2019-01-14 11:32:14 -0800127 args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* ",
Nan Zhang110f6152018-08-15 12:05:04 -0700128 installable: false,
129 check_api: {
130 last_released: {
131 api_file: ":android-car-last-released-api",
132 removed_api_file: "api/removed.txt",
133 args: " -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " +
134 " -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 " +
135 " -warning 13 -warning 14 -warning 15 -warning 16 -warning 17 -warning 18 -hide 113 ",
136 },
137 current: {
138 api_file: "api/current.txt",
139 removed_api_file: "api/removed.txt",
140 args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " +
141 " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " +
142 " -error 21 -error 23 -error 24 -error 25 -hide 113 ",
143 },
144 },
145}
146
Tor Norbyef4c428a2019-01-04 21:03:51 -0800147droidstubs {
Nan Zhang110f6152018-08-15 12:05:04 -0700148 name: "android.car-system-stubs-docs",
149 defaults: ["android.car-docs-default"],
150 api_tag_name: "ANDROID_CAR_SYSTEM",
151 api_filename: "api.txt",
152 removed_api_filename: "removed.txt",
Tor Norbyea4a35ac2019-01-14 11:32:14 -0800153 args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* " +
Tor Norbyef4c428a2019-01-04 21:03:51 -0800154 "--show-annotation android.annotation.SystemApi ",
Nan Zhang110f6152018-08-15 12:05:04 -0700155 installable: false,
156 check_api: {
157 last_released: {
158 api_file: ":android-car-last-released-system-api",
159 removed_api_file: "api/system-removed.txt",
160 args: " -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " +
161 " -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 " +
162 " -warning 13 -warning 14 -warning 15 -warning 16 -warning 17 -warning 18 -hide 113 ",
163 },
164 current: {
165 api_file: "api/system-current.txt",
166 removed_api_file: "api/system-removed.txt",
167 args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " +
168 " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " +
169 " -error 21 -error 23 -error 24 -error 25 -hide 113 ",
170 },
171 },
172}
173
Tor Norbyef4c428a2019-01-04 21:03:51 -0800174droidstubs {
Selim Gurune4029922018-12-12 17:18:43 -0800175 name: "android.car-test-stubs-docs",
176 defaults: ["android.car-docs-default"],
177 api_tag_name: "ANDROID_CAR_SYSTEM",
178 api_filename: "api.txt",
179 removed_api_filename: "removed.txt",
Tor Norbyea4a35ac2019-01-14 11:32:14 -0800180 args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* " +
Tor Norbyef4c428a2019-01-04 21:03:51 -0800181 "--show-annotation android.annotation.TestApi ",
Selim Gurune4029922018-12-12 17:18:43 -0800182 installable: false,
183 check_api: {
184 current: {
185 api_file: "api/test-current.txt",
186 removed_api_file: "api/test-removed.txt",
187 args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " +
188 " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " +
189 " -error 21 -error 23 -error 24 -error 25 -hide 113 ",
190 },
191 },
192}
193
Tor Norbyef4c428a2019-01-04 21:03:51 -0800194droidstubs {
Nan Zhang110f6152018-08-15 12:05:04 -0700195 name: "android.car-stub-docs",
196 srcs: [
197 "src/**/*.java",
198 ],
199 libs: [
200 "android.car",
201 ],
202 api_tag_name: "ANDROID_CAR_STUB",
203 api_filename: "api.txt",
Tor Norbyea4a35ac2019-01-14 11:32:14 -0800204 args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* ",
Nan Zhang110f6152018-08-15 12:05:04 -0700205 installable: false,
206 product_variables: {
207 pdk: {
208 enabled: false,
209 },
210 },
211}
212
213java_library_static {
214 name: "android.car-stubs",
215 srcs: [
216 ":android.car-stub-docs",
217 ],
218 libs: [
219 "android.car",
220 ],
221 product_variables: {
222 pdk: {
223 enabled: false,
224 },
225 },
David Brazdil43231d92018-08-24 14:36:57 +0100226 compile_dex: true,
Dean Harding42b446e2019-04-01 13:50:39 -0700227 dist: {
228 targets: ["dist_files"],
229 }
David Brazdil43231d92018-08-24 14:36:57 +0100230}
231
232java_library_static {
233 name: "android.car-system-stubs",
234 srcs: [
235 ":android.car-system-stubs-docs",
236 ],
237 libs: [
238 "android.car",
239 ],
240 product_variables: {
241 pdk: {
242 enabled: false,
243 },
244 },
245 compile_dex: true,
Dean Harding42b446e2019-04-01 13:50:39 -0700246 dist: {
247 targets: ["dist_files"],
248 }
Nan Zhang110f6152018-08-15 12:05:04 -0700249}
Selim Gurune4029922018-12-12 17:18:43 -0800250
251java_library_static {
252 name: "android.car-test-stubs",
253 srcs: [
254 ":android.car-test-stubs-docs",
255 ],
256 libs: [
257 "android.car",
258 ],
259 product_variables: {
260 pdk: {
261 enabled: false,
262 },
263 },
264 compile_dex: true,
265}