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", |
| 27 | |
| 28 | aidl: { |
| 29 | export_aidl_headers: true, |
| 30 | local_include_dirs: [ |
| 31 | "src", |
| 32 | ], |
| 33 | }, |
| 34 | |
| 35 | cflags: [ |
| 36 | "-Wall", |
| 37 | "-Werror", |
| 38 | "-Wextra", |
| 39 | "-Wno-unused-parameter", |
| 40 | ], |
| 41 | |
| 42 | include_dirs: [ |
| 43 | "packages/services/Car/car-lib/native/include", |
| 44 | ], |
| 45 | |
| 46 | shared_libs: [ |
| 47 | "libbinder", |
| 48 | "liblog", |
| 49 | "libutils", |
| 50 | ], |
| 51 | |
| 52 | srcs: [ |
Dan Willemsen | dbd4eea | 2019-06-06 13:38:12 -0700 | [diff] [blame^] | 53 | ":libcarpowermanager_aidl", |
Steve Paik | dd4857b | 2018-03-13 19:16:55 -0700 | [diff] [blame] | 54 | "native/CarPowerManager/CarPowerManager.cpp", |
| 55 | ], |
| 56 | } |
| 57 | |
Nan Zhang | f1544c2 | 2018-07-19 17:04:18 -0700 | [diff] [blame] | 58 | java_library { |
| 59 | name: "android.car", |
| 60 | srcs: [ |
| 61 | "src/**/*.java", |
| 62 | "src_feature_future/**/*.java", |
| 63 | "src/**/I*.aidl", |
| 64 | ], |
| 65 | aidl: { |
| 66 | include_dirs: [ |
| 67 | "system/bt/binder", |
| 68 | ], |
| 69 | }, |
| 70 | exclude_srcs: [ |
| 71 | "src/android/car/storagemonitoring/IoStats.aidl", |
| 72 | "src/android/car/storagemonitoring/IoStatsEntry.aidl", |
| 73 | ], |
| 74 | product_variables: { |
| 75 | pdk: { |
| 76 | enabled: false, |
| 77 | }, |
| 78 | }, |
| 79 | installable: true, |
| 80 | } |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 81 | |
Tor Norbye | 517e7d1 | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 82 | stubs_defaults { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 83 | name: "android.car-docs-default", |
| 84 | srcs: [ |
| 85 | "src/**/*.java", |
| 86 | "src_feature_future/**/*.java", |
| 87 | ], |
| 88 | libs: [ |
| 89 | "android.car", |
| 90 | ], |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 91 | product_variables: { |
| 92 | pdk: { |
| 93 | enabled: false, |
| 94 | }, |
| 95 | }, |
| 96 | } |
| 97 | |
| 98 | genrule { |
| 99 | name: "android-car-last-released-api", |
| 100 | srcs: [ |
| 101 | "api/released/*.txt", |
| 102 | ], |
| 103 | cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -n | tail -1) $(genDir)/last-released-api.txt", |
| 104 | out: [ |
| 105 | "last-released-api.txt", |
| 106 | ], |
| 107 | } |
| 108 | |
| 109 | genrule { |
| 110 | name: "android-car-last-released-system-api", |
| 111 | srcs: [ |
| 112 | "api/system-released/*.txt", |
| 113 | ], |
| 114 | cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -n | tail -1) $(genDir)/last-released-system-api.txt", |
| 115 | out: [ |
| 116 | "last-released-system-api.txt", |
| 117 | ], |
| 118 | } |
| 119 | |
Tor Norbye | 517e7d1 | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 120 | droidstubs { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 121 | name: "android.car-stubs-docs", |
| 122 | defaults: ["android.car-docs-default"], |
| 123 | api_tag_name: "ANDROID_CAR", |
| 124 | api_filename: "api.txt", |
| 125 | removed_api_filename: "removed.txt", |
Luca Stefani | 5b707a4 | 2019-01-13 11:53:14 +0100 | [diff] [blame] | 126 | 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] | 127 | installable: false, |
| 128 | check_api: { |
| 129 | last_released: { |
| 130 | api_file: ":android-car-last-released-api", |
| 131 | removed_api_file: "api/removed.txt", |
| 132 | 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] | 133 | " -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 " + |
| 134 | " -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] | 135 | }, |
| 136 | current: { |
| 137 | api_file: "api/current.txt", |
| 138 | removed_api_file: "api/removed.txt", |
| 139 | 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] | 140 | " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " + |
| 141 | " -error 21 -error 23 -error 24 -error 25 -hide 113 ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 142 | }, |
| 143 | }, |
| 144 | } |
| 145 | |
Tor Norbye | 517e7d1 | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 146 | droidstubs { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 147 | name: "android.car-system-stubs-docs", |
| 148 | defaults: ["android.car-docs-default"], |
| 149 | api_tag_name: "ANDROID_CAR_SYSTEM", |
| 150 | api_filename: "api.txt", |
| 151 | removed_api_filename: "removed.txt", |
Tor Norbye | 517e7d1 | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 152 | args: "--hide DeprecationMismatch --hide UnavailableSymbol --hide UnhiddenSystemApi --hide HiddenTypedefConstant --hide ReferencesHidden --no-docs --stub-packages android.car* " + |
| 153 | "--show-annotation android.annotation.SystemApi ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 154 | installable: false, |
| 155 | check_api: { |
| 156 | last_released: { |
| 157 | api_file: ":android-car-last-released-system-api", |
| 158 | removed_api_file: "api/system-removed.txt", |
| 159 | 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] | 160 | " -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 " + |
| 161 | " -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] | 162 | }, |
| 163 | current: { |
| 164 | api_file: "api/system-current.txt", |
| 165 | removed_api_file: "api/system-removed.txt", |
| 166 | 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] | 167 | " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " + |
| 168 | " -error 21 -error 23 -error 24 -error 25 -hide 113 ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 169 | }, |
| 170 | }, |
| 171 | } |
| 172 | |
Tor Norbye | 517e7d1 | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 173 | droidstubs { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 174 | name: "android.car-stub-docs", |
| 175 | srcs: [ |
| 176 | "src/**/*.java", |
| 177 | ], |
| 178 | libs: [ |
| 179 | "android.car", |
| 180 | ], |
| 181 | api_tag_name: "ANDROID_CAR_STUB", |
| 182 | api_filename: "api.txt", |
Luca Stefani | 5b707a4 | 2019-01-13 11:53:14 +0100 | [diff] [blame] | 183 | 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] | 184 | installable: false, |
| 185 | product_variables: { |
| 186 | pdk: { |
| 187 | enabled: false, |
| 188 | }, |
| 189 | }, |
| 190 | } |
| 191 | |
| 192 | java_library_static { |
| 193 | name: "android.car-stubs", |
| 194 | srcs: [ |
| 195 | ":android.car-stub-docs", |
| 196 | ], |
| 197 | libs: [ |
| 198 | "android.car", |
| 199 | ], |
| 200 | product_variables: { |
| 201 | pdk: { |
| 202 | enabled: false, |
| 203 | }, |
| 204 | }, |
David Brazdil | 43231d9 | 2018-08-24 14:36:57 +0100 | [diff] [blame] | 205 | compile_dex: true, |
| 206 | } |
| 207 | |
| 208 | java_library_static { |
| 209 | name: "android.car-system-stubs", |
| 210 | srcs: [ |
| 211 | ":android.car-system-stubs-docs", |
| 212 | ], |
| 213 | libs: [ |
| 214 | "android.car", |
| 215 | ], |
| 216 | product_variables: { |
| 217 | pdk: { |
| 218 | enabled: false, |
| 219 | }, |
| 220 | }, |
| 221 | compile_dex: true, |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 222 | } |
Paul Duffin | 7d03029 | 2019-05-30 15:42:41 +0100 | [diff] [blame] | 223 | |
| 224 | // Export the api/system-current.txt file. |
| 225 | filegroup { |
| 226 | name: "car-api-system-current.txt", |
| 227 | visibility: [ |
| 228 | "//cts/tests/signature/api", |
| 229 | ], |
| 230 | srcs: [ |
| 231 | "api/system-current.txt", |
| 232 | ], |
| 233 | } |
| 234 | |
| 235 | // Export the api/system-removed.txt file. |
| 236 | filegroup { |
| 237 | name: "car-api-system-removed.txt", |
| 238 | visibility: [ |
| 239 | "//cts/tests/signature/api", |
| 240 | ], |
| 241 | srcs: [ |
| 242 | "api/system-removed.txt", |
| 243 | ], |
| 244 | } |