blob: 1d887fa32dcbfe2c56456171475ad3a231bddab8 [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 {
51 name: "android.car",
52 srcs: [
53 "src/**/*.java",
54 "src_feature_future/**/*.java",
55 "src/**/I*.aidl",
56 ],
57 aidl: {
58 include_dirs: [
59 "system/bt/binder",
60 ],
61 },
62 exclude_srcs: [
63 "src/android/car/storagemonitoring/IoStats.aidl",
64 "src/android/car/storagemonitoring/IoStatsEntry.aidl",
65 ],
66 product_variables: {
67 pdk: {
68 enabled: false,
69 },
70 },
71 installable: true,
72}
Nan Zhang110f6152018-08-15 12:05:04 -070073
Tor Norbyef4c428a2019-01-04 21:03:51 -080074stubs_defaults {
Nan Zhang110f6152018-08-15 12:05:04 -070075 name: "android.car-docs-default",
76 srcs: [
77 "src/**/*.java",
78 "src_feature_future/**/*.java",
79 ],
80 libs: [
81 "android.car",
82 ],
Nan Zhang110f6152018-08-15 12:05:04 -070083 product_variables: {
84 pdk: {
85 enabled: false,
86 },
87 },
88}
89
90genrule {
91 name: "android-car-last-released-api",
92 srcs: [
93 "api/released/*.txt",
94 ],
95 cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -n | tail -1) $(genDir)/last-released-api.txt",
96 out: [
97 "last-released-api.txt",
98 ],
99}
100
101genrule {
102 name: "android-car-last-released-system-api",
103 srcs: [
104 "api/system-released/*.txt",
105 ],
106 cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -n | tail -1) $(genDir)/last-released-system-api.txt",
107 out: [
108 "last-released-system-api.txt",
109 ],
110}
111
Selim Gurune4029922018-12-12 17:18:43 -0800112genrule {
113 name: "android-car-last-released-test-api",
114 srcs: [
115 "api/test-released/*.txt",
116 ],
117 cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -n | tail -1) $(genDir)/last-released-test-api.txt",
118 out: [
119 "last-released-test-api.txt",
120 ],
121}
122
Tor Norbyef4c428a2019-01-04 21:03:51 -0800123droidstubs {
Nan Zhang110f6152018-08-15 12:05:04 -0700124 name: "android.car-stubs-docs",
125 defaults: ["android.car-docs-default"],
126 api_tag_name: "ANDROID_CAR",
127 api_filename: "api.txt",
128 removed_api_filename: "removed.txt",
Tor Norbyea4a35ac2019-01-14 11:32:14 -0800129 args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* ",
Nan Zhang110f6152018-08-15 12:05:04 -0700130 installable: false,
131 check_api: {
132 last_released: {
133 api_file: ":android-car-last-released-api",
134 removed_api_file: "api/removed.txt",
135 args: " -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " +
136 " -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 " +
137 " -warning 13 -warning 14 -warning 15 -warning 16 -warning 17 -warning 18 -hide 113 ",
138 },
139 current: {
140 api_file: "api/current.txt",
141 removed_api_file: "api/removed.txt",
142 args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " +
143 " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " +
144 " -error 21 -error 23 -error 24 -error 25 -hide 113 ",
145 },
146 },
147}
148
Tor Norbyef4c428a2019-01-04 21:03:51 -0800149droidstubs {
Nan Zhang110f6152018-08-15 12:05:04 -0700150 name: "android.car-system-stubs-docs",
151 defaults: ["android.car-docs-default"],
152 api_tag_name: "ANDROID_CAR_SYSTEM",
153 api_filename: "api.txt",
154 removed_api_filename: "removed.txt",
Tor Norbyea4a35ac2019-01-14 11:32:14 -0800155 args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* " +
Tor Norbyef4c428a2019-01-04 21:03:51 -0800156 "--show-annotation android.annotation.SystemApi ",
Nan Zhang110f6152018-08-15 12:05:04 -0700157 installable: false,
158 check_api: {
159 last_released: {
160 api_file: ":android-car-last-released-system-api",
161 removed_api_file: "api/system-removed.txt",
162 args: " -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " +
163 " -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 " +
164 " -warning 13 -warning 14 -warning 15 -warning 16 -warning 17 -warning 18 -hide 113 ",
165 },
166 current: {
167 api_file: "api/system-current.txt",
168 removed_api_file: "api/system-removed.txt",
169 args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " +
170 " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " +
171 " -error 21 -error 23 -error 24 -error 25 -hide 113 ",
172 },
173 },
174}
175
Tor Norbyef4c428a2019-01-04 21:03:51 -0800176droidstubs {
Selim Gurune4029922018-12-12 17:18:43 -0800177 name: "android.car-test-stubs-docs",
178 defaults: ["android.car-docs-default"],
179 api_tag_name: "ANDROID_CAR_SYSTEM",
180 api_filename: "api.txt",
181 removed_api_filename: "removed.txt",
Tor Norbyea4a35ac2019-01-14 11:32:14 -0800182 args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* " +
Tor Norbyef4c428a2019-01-04 21:03:51 -0800183 "--show-annotation android.annotation.TestApi ",
Selim Gurune4029922018-12-12 17:18:43 -0800184 installable: false,
185 check_api: {
186 current: {
187 api_file: "api/test-current.txt",
188 removed_api_file: "api/test-removed.txt",
189 args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " +
190 " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " +
191 " -error 21 -error 23 -error 24 -error 25 -hide 113 ",
192 },
193 },
194}
195
Tor Norbyef4c428a2019-01-04 21:03:51 -0800196droidstubs {
Nan Zhang110f6152018-08-15 12:05:04 -0700197 name: "android.car-stub-docs",
198 srcs: [
199 "src/**/*.java",
200 ],
201 libs: [
202 "android.car",
203 ],
204 api_tag_name: "ANDROID_CAR_STUB",
205 api_filename: "api.txt",
Tor Norbyea4a35ac2019-01-14 11:32:14 -0800206 args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* ",
Nan Zhang110f6152018-08-15 12:05:04 -0700207 installable: false,
208 product_variables: {
209 pdk: {
210 enabled: false,
211 },
212 },
213}
214
215java_library_static {
216 name: "android.car-stubs",
217 srcs: [
218 ":android.car-stub-docs",
219 ],
220 libs: [
221 "android.car",
222 ],
223 product_variables: {
224 pdk: {
225 enabled: false,
226 },
227 },
David Brazdil43231d92018-08-24 14:36:57 +0100228 compile_dex: true,
229}
230
231java_library_static {
232 name: "android.car-system-stubs",
233 srcs: [
234 ":android.car-system-stubs-docs",
235 ],
236 libs: [
237 "android.car",
238 ],
239 product_variables: {
240 pdk: {
241 enabled: false,
242 },
243 },
244 compile_dex: true,
Nan Zhang110f6152018-08-15 12:05:04 -0700245}
Selim Gurune4029922018-12-12 17:18:43 -0800246
247java_library_static {
248 name: "android.car-test-stubs",
249 srcs: [
250 ":android.car-test-stubs-docs",
251 ],
252 libs: [
253 "android.car",
254 ],
255 product_variables: {
256 pdk: {
257 enabled: false,
258 },
259 },
260 compile_dex: true,
261}