Steve Paik | dd4857b | 2018-03-13 19:16:55 -0700 | [diff] [blame] | 1 | // 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 | |
Dan Willemsen | dbd4eea | 2019-06-06 13:38:12 -0700 | [diff] [blame] | 15 | filegroup { |
| 16 | name: "libcarpowermanager_aidl", |
| 17 | srcs: [ |
| 18 | "src/android/car/ICar.aidl", |
| 19 | "src/android/car/hardware/power/ICarPower.aidl", |
| 20 | "src/android/car/hardware/power/ICarPowerStateListener.aidl", |
| 21 | ], |
| 22 | path: "src", |
| 23 | } |
| 24 | |
Steve Paik | dd4857b | 2018-03-13 19:16:55 -0700 | [diff] [blame] | 25 | cc_library { |
| 26 | name: "libcarpowermanager", |
Hyejin Kim | 085ab65 | 2019-08-09 18:13:33 +0900 | [diff] [blame] | 27 | vendor_available: true, |
Steve Paik | dd4857b | 2018-03-13 19:16:55 -0700 | [diff] [blame] | 28 | |
| 29 | aidl: { |
| 30 | export_aidl_headers: true, |
| 31 | local_include_dirs: [ |
| 32 | "src", |
| 33 | ], |
| 34 | }, |
| 35 | |
| 36 | cflags: [ |
| 37 | "-Wall", |
| 38 | "-Werror", |
| 39 | "-Wextra", |
| 40 | "-Wno-unused-parameter", |
| 41 | ], |
| 42 | |
| 43 | include_dirs: [ |
| 44 | "packages/services/Car/car-lib/native/include", |
| 45 | ], |
| 46 | |
| 47 | shared_libs: [ |
| 48 | "libbinder", |
| 49 | "liblog", |
| 50 | "libutils", |
| 51 | ], |
| 52 | |
| 53 | srcs: [ |
Dan Willemsen | dbd4eea | 2019-06-06 13:38:12 -0700 | [diff] [blame] | 54 | ":libcarpowermanager_aidl", |
Steve Paik | dd4857b | 2018-03-13 19:16:55 -0700 | [diff] [blame] | 55 | "native/CarPowerManager/CarPowerManager.cpp", |
| 56 | ], |
| 57 | } |
| 58 | |
Nan Zhang | f1544c2 | 2018-07-19 17:04:18 -0700 | [diff] [blame] | 59 | java_library { |
Peter Li | bba8715 | 2019-05-31 18:57:00 -0700 | [diff] [blame] | 60 | name: "android.car.cluster.navigation", |
| 61 | proto: { |
| 62 | type: "lite", |
| 63 | }, |
| 64 | static_libs: ["libprotobuf-java-lite"], |
| 65 | srcs: ["src/android/car/navigation/navigation_state.proto"] |
| 66 | } |
| 67 | |
Mayank Garg | 0c3e62c | 2020-01-28 15:00:53 -0800 | [diff] [blame] | 68 | // library to access settings from CarSettings |
| 69 | java_library { |
| 70 | name: "android.car.settings", |
| 71 | srcs: ["src/android/car/settings/CarSettings.java"] |
| 72 | } |
| 73 | |
Peter Li | bba8715 | 2019-05-31 18:57:00 -0700 | [diff] [blame] | 74 | java_library { |
Nan Zhang | f1544c2 | 2018-07-19 17:04:18 -0700 | [diff] [blame] | 75 | name: "android.car", |
| 76 | srcs: [ |
| 77 | "src/**/*.java", |
Nan Zhang | f1544c2 | 2018-07-19 17:04:18 -0700 | [diff] [blame] | 78 | "src/**/I*.aidl", |
| 79 | ], |
| 80 | aidl: { |
| 81 | include_dirs: [ |
| 82 | "system/bt/binder", |
Eric Jeong | 38ae821 | 2020-01-14 10:25:10 -0800 | [diff] [blame] | 83 | "packages/services/Car/watchdog/aidl", |
Nan Zhang | f1544c2 | 2018-07-19 17:04:18 -0700 | [diff] [blame] | 84 | ], |
| 85 | }, |
| 86 | exclude_srcs: [ |
| 87 | "src/android/car/storagemonitoring/IoStats.aidl", |
| 88 | "src/android/car/storagemonitoring/IoStatsEntry.aidl", |
| 89 | ], |
Eric Jeong | 38ae821 | 2020-01-14 10:25:10 -0800 | [diff] [blame] | 90 | static_libs: [ |
felipeal | 312416a | 2020-04-14 12:28:24 -0700 | [diff] [blame] | 91 | "android.car.internal.event-log-tags", |
Eric Jeong | 38ae821 | 2020-01-14 10:25:10 -0800 | [diff] [blame] | 92 | "carwatchdog_aidl_interface-java", |
| 93 | ], |
Nan Zhang | f1544c2 | 2018-07-19 17:04:18 -0700 | [diff] [blame] | 94 | product_variables: { |
| 95 | pdk: { |
| 96 | enabled: false, |
| 97 | }, |
| 98 | }, |
| 99 | installable: true, |
| 100 | } |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 101 | |
Tor Norbye | f4c428a | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 102 | stubs_defaults { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 103 | name: "android.car-docs-default", |
| 104 | srcs: [ |
| 105 | "src/**/*.java", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 106 | ], |
| 107 | libs: [ |
| 108 | "android.car", |
| 109 | ], |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 110 | product_variables: { |
| 111 | pdk: { |
| 112 | enabled: false, |
| 113 | }, |
| 114 | }, |
| 115 | } |
| 116 | |
| 117 | genrule { |
| 118 | name: "android-car-last-released-api", |
| 119 | srcs: [ |
| 120 | "api/released/*.txt", |
| 121 | ], |
| 122 | cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -n | tail -1) $(genDir)/last-released-api.txt", |
| 123 | out: [ |
| 124 | "last-released-api.txt", |
| 125 | ], |
| 126 | } |
| 127 | |
| 128 | genrule { |
| 129 | name: "android-car-last-released-system-api", |
| 130 | srcs: [ |
| 131 | "api/system-released/*.txt", |
| 132 | ], |
| 133 | cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -n | tail -1) $(genDir)/last-released-system-api.txt", |
| 134 | out: [ |
| 135 | "last-released-system-api.txt", |
| 136 | ], |
| 137 | } |
| 138 | |
Tor Norbye | f4c428a | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 139 | droidstubs { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 140 | name: "android.car-stubs-docs", |
| 141 | defaults: ["android.car-docs-default"], |
Tor Norbye | a4a35ac | 2019-01-14 11:32:14 -0800 | [diff] [blame] | 142 | args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 143 | installable: false, |
| 144 | check_api: { |
| 145 | last_released: { |
| 146 | api_file: ":android-car-last-released-api", |
| 147 | removed_api_file: "api/removed.txt", |
| 148 | args: " -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " + |
Paul Duffin | 7d03029 | 2019-05-30 15:42:41 +0100 | [diff] [blame] | 149 | " -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 " + |
| 150 | " -warning 13 -warning 14 -warning 15 -warning 16 -warning 17 -warning 18 -hide 113 ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 151 | }, |
| 152 | current: { |
| 153 | api_file: "api/current.txt", |
| 154 | removed_api_file: "api/removed.txt", |
| 155 | args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " + |
Paul Duffin | 7d03029 | 2019-05-30 15:42:41 +0100 | [diff] [blame] | 156 | " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " + |
| 157 | " -error 21 -error 23 -error 24 -error 25 -hide 113 ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 158 | }, |
Enrico Granata | 003c369 | 2020-01-14 15:43:34 -0800 | [diff] [blame] | 159 | api_lint: { |
| 160 | enabled: true, |
| 161 | baseline_file: "api/lint-baseline.txt", |
| 162 | } |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 163 | }, |
| 164 | } |
| 165 | |
Tor Norbye | f4c428a | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 166 | droidstubs { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 167 | name: "android.car-system-stubs-docs", |
| 168 | defaults: ["android.car-docs-default"], |
Tor Norbye | a4a35ac | 2019-01-14 11:32:14 -0800 | [diff] [blame] | 169 | args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* " + |
Tor Norbye | f4c428a | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 170 | "--show-annotation android.annotation.SystemApi ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 171 | installable: false, |
| 172 | check_api: { |
| 173 | last_released: { |
| 174 | api_file: ":android-car-last-released-system-api", |
| 175 | removed_api_file: "api/system-removed.txt", |
| 176 | args: " -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " + |
Paul Duffin | 7d03029 | 2019-05-30 15:42:41 +0100 | [diff] [blame] | 177 | " -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 " + |
| 178 | " -warning 13 -warning 14 -warning 15 -warning 16 -warning 17 -warning 18 -hide 113 ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 179 | }, |
| 180 | current: { |
| 181 | api_file: "api/system-current.txt", |
| 182 | removed_api_file: "api/system-removed.txt", |
| 183 | args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " + |
Paul Duffin | 7d03029 | 2019-05-30 15:42:41 +0100 | [diff] [blame] | 184 | " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " + |
| 185 | " -error 21 -error 23 -error 24 -error 25 -hide 113 ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 186 | }, |
Enrico Granata | 003c369 | 2020-01-14 15:43:34 -0800 | [diff] [blame] | 187 | api_lint: { |
| 188 | enabled: true, |
| 189 | baseline_file: "api/system-lint-baseline.txt", |
| 190 | } |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 191 | }, |
| 192 | } |
| 193 | |
Tor Norbye | f4c428a | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 194 | droidstubs { |
Selim Gurun | e402992 | 2018-12-12 17:18:43 -0800 | [diff] [blame] | 195 | name: "android.car-test-stubs-docs", |
| 196 | defaults: ["android.car-docs-default"], |
Tor Norbye | a4a35ac | 2019-01-14 11:32:14 -0800 | [diff] [blame] | 197 | args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* " + |
Tor Norbye | f4c428a | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 198 | "--show-annotation android.annotation.TestApi ", |
Selim Gurun | e402992 | 2018-12-12 17:18:43 -0800 | [diff] [blame] | 199 | installable: false, |
| 200 | check_api: { |
| 201 | current: { |
| 202 | api_file: "api/test-current.txt", |
| 203 | removed_api_file: "api/test-removed.txt", |
| 204 | args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " + |
| 205 | " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " + |
| 206 | " -error 21 -error 23 -error 24 -error 25 -hide 113 ", |
| 207 | }, |
| 208 | }, |
| 209 | } |
| 210 | |
Tor Norbye | f4c428a | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 211 | droidstubs { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 212 | name: "android.car-stub-docs", |
| 213 | srcs: [ |
| 214 | "src/**/*.java", |
| 215 | ], |
| 216 | libs: [ |
| 217 | "android.car", |
| 218 | ], |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 219 | api_filename: "api.txt", |
Tor Norbye | a4a35ac | 2019-01-14 11:32:14 -0800 | [diff] [blame] | 220 | args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 221 | installable: false, |
| 222 | product_variables: { |
| 223 | pdk: { |
| 224 | enabled: false, |
| 225 | }, |
| 226 | }, |
| 227 | } |
| 228 | |
Dean Harding | 877990f | 2019-04-02 13:57:49 -0700 | [diff] [blame] | 229 | java_library { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 230 | name: "android.car-stubs", |
| 231 | srcs: [ |
| 232 | ":android.car-stub-docs", |
| 233 | ], |
Keun young Park | 528ed5d | 2019-12-20 10:12:05 -0800 | [diff] [blame] | 234 | sdk_version: "current", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 235 | product_variables: { |
| 236 | pdk: { |
| 237 | enabled: false, |
| 238 | }, |
| 239 | }, |
Dean Harding | 877990f | 2019-04-02 13:57:49 -0700 | [diff] [blame] | 240 | installable: false, |
Dean Harding | 42b446e | 2019-04-01 13:50:39 -0700 | [diff] [blame] | 241 | dist: { |
| 242 | targets: ["dist_files"], |
| 243 | } |
David Brazdil | 43231d9 | 2018-08-24 14:36:57 +0100 | [diff] [blame] | 244 | } |
| 245 | |
Dean Harding | 877990f | 2019-04-02 13:57:49 -0700 | [diff] [blame] | 246 | java_library { |
| 247 | name: "android.car-stubs-dex", |
| 248 | static_libs: ["android.car-stubs"], |
Keun young Park | 528ed5d | 2019-12-20 10:12:05 -0800 | [diff] [blame] | 249 | sdk_version: "current", |
Dean Harding | 877990f | 2019-04-02 13:57:49 -0700 | [diff] [blame] | 250 | product_variables: { |
| 251 | pdk: { |
| 252 | enabled: false, |
| 253 | }, |
| 254 | }, |
| 255 | compile_dex: true, |
| 256 | } |
| 257 | |
| 258 | java_library { |
David Brazdil | 43231d9 | 2018-08-24 14:36:57 +0100 | [diff] [blame] | 259 | name: "android.car-system-stubs", |
| 260 | srcs: [ |
| 261 | ":android.car-system-stubs-docs", |
| 262 | ], |
Keun young Park | 528ed5d | 2019-12-20 10:12:05 -0800 | [diff] [blame] | 263 | sdk_version: "system_current", |
David Brazdil | 43231d9 | 2018-08-24 14:36:57 +0100 | [diff] [blame] | 264 | product_variables: { |
| 265 | pdk: { |
| 266 | enabled: false, |
| 267 | }, |
| 268 | }, |
Dean Harding | 877990f | 2019-04-02 13:57:49 -0700 | [diff] [blame] | 269 | installable: false, |
Dean Harding | 42b446e | 2019-04-01 13:50:39 -0700 | [diff] [blame] | 270 | dist: { |
| 271 | targets: ["dist_files"], |
| 272 | } |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 273 | } |
Selim Gurun | e402992 | 2018-12-12 17:18:43 -0800 | [diff] [blame] | 274 | |
Dean Harding | 877990f | 2019-04-02 13:57:49 -0700 | [diff] [blame] | 275 | java_library { |
| 276 | name: "android.car-system-stubs-dex", |
| 277 | static_libs: ["android.car-system-stubs"], |
Keun young Park | 528ed5d | 2019-12-20 10:12:05 -0800 | [diff] [blame] | 278 | sdk_version: "system_current", |
Dean Harding | 877990f | 2019-04-02 13:57:49 -0700 | [diff] [blame] | 279 | product_variables: { |
| 280 | pdk: { |
| 281 | enabled: false, |
| 282 | }, |
| 283 | }, |
| 284 | compile_dex: true, |
| 285 | } |
| 286 | |
Keun young Park | 528ed5d | 2019-12-20 10:12:05 -0800 | [diff] [blame] | 287 | java_library { |
Selim Gurun | e402992 | 2018-12-12 17:18:43 -0800 | [diff] [blame] | 288 | name: "android.car-test-stubs", |
| 289 | srcs: [ |
| 290 | ":android.car-test-stubs-docs", |
| 291 | ], |
Keun young Park | 528ed5d | 2019-12-20 10:12:05 -0800 | [diff] [blame] | 292 | sdk_version: "test_current", |
Selim Gurun | e402992 | 2018-12-12 17:18:43 -0800 | [diff] [blame] | 293 | product_variables: { |
| 294 | pdk: { |
| 295 | enabled: false, |
| 296 | }, |
| 297 | }, |
Dean Harding | 877990f | 2019-04-02 13:57:49 -0700 | [diff] [blame] | 298 | installable: false, |
| 299 | } |
| 300 | |
| 301 | java_library { |
| 302 | name: "android.car-test-stubs-dex", |
| 303 | static_libs: ["android.car-test-stubs"], |
Keun young Park | 528ed5d | 2019-12-20 10:12:05 -0800 | [diff] [blame] | 304 | sdk_version: "test_current", |
Dean Harding | 877990f | 2019-04-02 13:57:49 -0700 | [diff] [blame] | 305 | product_variables: { |
| 306 | pdk: { |
| 307 | enabled: false, |
| 308 | }, |
| 309 | }, |
Selim Gurun | e402992 | 2018-12-12 17:18:43 -0800 | [diff] [blame] | 310 | compile_dex: true, |
Keun young Park | c0d19dc | 2020-01-23 11:33:51 -0800 | [diff] [blame] | 311 | dist: { |
| 312 | targets: ["dist_files"], |
| 313 | } |
Selim Gurun | e402992 | 2018-12-12 17:18:43 -0800 | [diff] [blame] | 314 | } |
Paul Duffin | 7d03029 | 2019-05-30 15:42:41 +0100 | [diff] [blame] | 315 | |
| 316 | // Export the api/system-current.txt file. |
| 317 | filegroup { |
| 318 | name: "car-api-system-current.txt", |
| 319 | visibility: [ |
| 320 | "//cts/tests/signature/api", |
| 321 | ], |
| 322 | srcs: [ |
| 323 | "api/system-current.txt", |
| 324 | ], |
| 325 | } |
| 326 | |
| 327 | // Export the api/system-removed.txt file. |
| 328 | filegroup { |
| 329 | name: "car-api-system-removed.txt", |
| 330 | visibility: [ |
| 331 | "//cts/tests/signature/api", |
| 332 | ], |
| 333 | srcs: [ |
| 334 | "api/system-removed.txt", |
| 335 | ], |
| 336 | } |