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 { |
| 60 | 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 Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 82 | |
Tor Norbye | 517e7d1 | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 83 | stubs_defaults { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 84 | name: "android.car-docs-default", |
| 85 | srcs: [ |
| 86 | "src/**/*.java", |
| 87 | "src_feature_future/**/*.java", |
| 88 | ], |
| 89 | libs: [ |
| 90 | "android.car", |
| 91 | ], |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 92 | product_variables: { |
| 93 | pdk: { |
| 94 | enabled: false, |
| 95 | }, |
| 96 | }, |
| 97 | } |
| 98 | |
| 99 | genrule { |
| 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 | |
| 110 | genrule { |
| 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 Norbye | 517e7d1 | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 121 | droidstubs { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 122 | 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", |
Luca Stefani | 5b707a4 | 2019-01-13 11:53:14 +0100 | [diff] [blame] | 127 | args: "--hide DeprecationMismatch --hide UnavailableSymbol --hide UnhiddenSystemApi --hide HiddenTypedefConstant --hide ReferencesHidden --no-docs --stub-packages android.car* ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 128 | 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 " + |
Paul Duffin | 7d03029 | 2019-05-30 15:42:41 +0100 | [diff] [blame] | 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 ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 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 " + |
Paul Duffin | 7d03029 | 2019-05-30 15:42:41 +0100 | [diff] [blame] | 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 ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 143 | }, |
| 144 | }, |
| 145 | } |
| 146 | |
Tor Norbye | 517e7d1 | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 147 | droidstubs { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 148 | 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 Norbye | 517e7d1 | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 153 | args: "--hide DeprecationMismatch --hide UnavailableSymbol --hide UnhiddenSystemApi --hide HiddenTypedefConstant --hide ReferencesHidden --no-docs --stub-packages android.car* " + |
| 154 | "--show-annotation android.annotation.SystemApi ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 155 | 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 " + |
Paul Duffin | 7d03029 | 2019-05-30 15:42:41 +0100 | [diff] [blame] | 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 ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 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 " + |
Paul Duffin | 7d03029 | 2019-05-30 15:42:41 +0100 | [diff] [blame] | 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 ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 170 | }, |
| 171 | }, |
| 172 | } |
| 173 | |
Tor Norbye | 517e7d1 | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 174 | droidstubs { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 175 | name: "android.car-stub-docs", |
| 176 | srcs: [ |
| 177 | "src/**/*.java", |
| 178 | ], |
| 179 | libs: [ |
| 180 | "android.car", |
| 181 | ], |
| 182 | api_tag_name: "ANDROID_CAR_STUB", |
| 183 | api_filename: "api.txt", |
Luca Stefani | 5b707a4 | 2019-01-13 11:53:14 +0100 | [diff] [blame] | 184 | args: "--hide DeprecationMismatch --hide UnavailableSymbol --hide UnhiddenSystemApi --hide HiddenTypedefConstant --hide ReferencesHidden --no-docs --stub-packages android.car* ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 185 | installable: false, |
| 186 | product_variables: { |
| 187 | pdk: { |
| 188 | enabled: false, |
| 189 | }, |
| 190 | }, |
| 191 | } |
| 192 | |
| 193 | java_library_static { |
| 194 | name: "android.car-stubs", |
| 195 | srcs: [ |
| 196 | ":android.car-stub-docs", |
| 197 | ], |
| 198 | libs: [ |
| 199 | "android.car", |
| 200 | ], |
| 201 | product_variables: { |
| 202 | pdk: { |
| 203 | enabled: false, |
| 204 | }, |
| 205 | }, |
David Brazdil | 43231d9 | 2018-08-24 14:36:57 +0100 | [diff] [blame] | 206 | compile_dex: true, |
| 207 | } |
| 208 | |
| 209 | java_library_static { |
| 210 | name: "android.car-system-stubs", |
| 211 | srcs: [ |
| 212 | ":android.car-system-stubs-docs", |
| 213 | ], |
| 214 | libs: [ |
| 215 | "android.car", |
| 216 | ], |
| 217 | product_variables: { |
| 218 | pdk: { |
| 219 | enabled: false, |
| 220 | }, |
| 221 | }, |
| 222 | compile_dex: true, |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 223 | } |
Paul Duffin | 7d03029 | 2019-05-30 15:42:41 +0100 | [diff] [blame] | 224 | |
| 225 | // Export the api/system-current.txt file. |
| 226 | filegroup { |
| 227 | name: "car-api-system-current.txt", |
| 228 | visibility: [ |
| 229 | "//cts/tests/signature/api", |
| 230 | ], |
| 231 | srcs: [ |
| 232 | "api/system-current.txt", |
| 233 | ], |
| 234 | } |
| 235 | |
| 236 | // Export the api/system-removed.txt file. |
| 237 | filegroup { |
| 238 | name: "car-api-system-removed.txt", |
| 239 | visibility: [ |
| 240 | "//cts/tests/signature/api", |
| 241 | ], |
| 242 | srcs: [ |
| 243 | "api/system-removed.txt", |
| 244 | ], |
| 245 | } |