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 | |
| 15 | cc_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 Zhang | f1544c2 | 2018-07-19 17:04:18 -0700 | [diff] [blame] | 50 | java_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 Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 73 | |
Tor Norbye | f4c428a | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 74 | stubs_defaults { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 75 | name: "android.car-docs-default", |
| 76 | srcs: [ |
| 77 | "src/**/*.java", |
| 78 | "src_feature_future/**/*.java", |
| 79 | ], |
| 80 | libs: [ |
| 81 | "android.car", |
| 82 | ], |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 83 | product_variables: { |
| 84 | pdk: { |
| 85 | enabled: false, |
| 86 | }, |
| 87 | }, |
| 88 | } |
| 89 | |
| 90 | genrule { |
| 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 | |
| 101 | genrule { |
| 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 | |
Tor Norbye | f4c428a | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 112 | droidstubs { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 113 | name: "android.car-stubs-docs", |
| 114 | defaults: ["android.car-docs-default"], |
| 115 | api_tag_name: "ANDROID_CAR", |
| 116 | api_filename: "api.txt", |
| 117 | removed_api_filename: "removed.txt", |
Tor Norbye | a4a35ac | 2019-01-14 11:32:14 -0800 | [diff] [blame] | 118 | args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 119 | installable: false, |
| 120 | check_api: { |
| 121 | last_released: { |
| 122 | api_file: ":android-car-last-released-api", |
| 123 | removed_api_file: "api/removed.txt", |
| 124 | args: " -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " + |
| 125 | " -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 " + |
| 126 | " -warning 13 -warning 14 -warning 15 -warning 16 -warning 17 -warning 18 -hide 113 ", |
| 127 | }, |
| 128 | current: { |
| 129 | api_file: "api/current.txt", |
| 130 | removed_api_file: "api/removed.txt", |
| 131 | args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " + |
| 132 | " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " + |
| 133 | " -error 21 -error 23 -error 24 -error 25 -hide 113 ", |
| 134 | }, |
| 135 | }, |
| 136 | } |
| 137 | |
Tor Norbye | f4c428a | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 138 | droidstubs { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 139 | name: "android.car-system-stubs-docs", |
| 140 | defaults: ["android.car-docs-default"], |
| 141 | api_tag_name: "ANDROID_CAR_SYSTEM", |
| 142 | api_filename: "api.txt", |
| 143 | removed_api_filename: "removed.txt", |
Tor Norbye | a4a35ac | 2019-01-14 11:32:14 -0800 | [diff] [blame] | 144 | args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* " + |
Tor Norbye | f4c428a | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 145 | "--show-annotation android.annotation.SystemApi ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 146 | installable: false, |
| 147 | check_api: { |
| 148 | last_released: { |
| 149 | api_file: ":android-car-last-released-system-api", |
| 150 | removed_api_file: "api/system-removed.txt", |
| 151 | args: " -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " + |
| 152 | " -warning 7 -warning 8 -warning 9 -warning 10 -warning 11 -warning 12 " + |
| 153 | " -warning 13 -warning 14 -warning 15 -warning 16 -warning 17 -warning 18 -hide 113 ", |
| 154 | }, |
| 155 | current: { |
| 156 | api_file: "api/system-current.txt", |
| 157 | removed_api_file: "api/system-removed.txt", |
| 158 | args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " + |
| 159 | " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " + |
| 160 | " -error 21 -error 23 -error 24 -error 25 -hide 113 ", |
| 161 | }, |
| 162 | }, |
| 163 | } |
| 164 | |
Tor Norbye | f4c428a | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 165 | droidstubs { |
Selim Gurun | e402992 | 2018-12-12 17:18:43 -0800 | [diff] [blame] | 166 | name: "android.car-test-stubs-docs", |
| 167 | defaults: ["android.car-docs-default"], |
| 168 | api_tag_name: "ANDROID_CAR_SYSTEM", |
| 169 | api_filename: "api.txt", |
| 170 | removed_api_filename: "removed.txt", |
Tor Norbye | a4a35ac | 2019-01-14 11:32:14 -0800 | [diff] [blame] | 171 | args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* " + |
Tor Norbye | f4c428a | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 172 | "--show-annotation android.annotation.TestApi ", |
Selim Gurun | e402992 | 2018-12-12 17:18:43 -0800 | [diff] [blame] | 173 | installable: false, |
| 174 | check_api: { |
| 175 | current: { |
| 176 | api_file: "api/test-current.txt", |
| 177 | removed_api_file: "api/test-removed.txt", |
| 178 | args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " + |
| 179 | " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " + |
| 180 | " -error 21 -error 23 -error 24 -error 25 -hide 113 ", |
| 181 | }, |
| 182 | }, |
| 183 | } |
| 184 | |
Tor Norbye | f4c428a | 2019-01-04 21:03:51 -0800 | [diff] [blame] | 185 | droidstubs { |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 186 | name: "android.car-stub-docs", |
| 187 | srcs: [ |
| 188 | "src/**/*.java", |
| 189 | ], |
| 190 | libs: [ |
| 191 | "android.car", |
| 192 | ], |
| 193 | api_tag_name: "ANDROID_CAR_STUB", |
| 194 | api_filename: "api.txt", |
Tor Norbye | a4a35ac | 2019-01-14 11:32:14 -0800 | [diff] [blame] | 195 | args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* ", |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 196 | installable: false, |
| 197 | product_variables: { |
| 198 | pdk: { |
| 199 | enabled: false, |
| 200 | }, |
| 201 | }, |
| 202 | } |
| 203 | |
| 204 | java_library_static { |
| 205 | name: "android.car-stubs", |
| 206 | srcs: [ |
| 207 | ":android.car-stub-docs", |
| 208 | ], |
| 209 | libs: [ |
| 210 | "android.car", |
| 211 | ], |
| 212 | product_variables: { |
| 213 | pdk: { |
| 214 | enabled: false, |
| 215 | }, |
| 216 | }, |
David Brazdil | 43231d9 | 2018-08-24 14:36:57 +0100 | [diff] [blame] | 217 | compile_dex: true, |
Dean Harding | 42b446e | 2019-04-01 13:50:39 -0700 | [diff] [blame] | 218 | dist: { |
| 219 | targets: ["dist_files"], |
| 220 | } |
David Brazdil | 43231d9 | 2018-08-24 14:36:57 +0100 | [diff] [blame] | 221 | } |
| 222 | |
| 223 | java_library_static { |
| 224 | name: "android.car-system-stubs", |
| 225 | srcs: [ |
| 226 | ":android.car-system-stubs-docs", |
| 227 | ], |
| 228 | libs: [ |
| 229 | "android.car", |
| 230 | ], |
| 231 | product_variables: { |
| 232 | pdk: { |
| 233 | enabled: false, |
| 234 | }, |
| 235 | }, |
| 236 | compile_dex: true, |
Dean Harding | 42b446e | 2019-04-01 13:50:39 -0700 | [diff] [blame] | 237 | dist: { |
| 238 | targets: ["dist_files"], |
| 239 | } |
Nan Zhang | 110f615 | 2018-08-15 12:05:04 -0700 | [diff] [blame] | 240 | } |
Selim Gurun | e402992 | 2018-12-12 17:18:43 -0800 | [diff] [blame] | 241 | |
| 242 | java_library_static { |
| 243 | name: "android.car-test-stubs", |
| 244 | srcs: [ |
| 245 | ":android.car-test-stubs-docs", |
| 246 | ], |
| 247 | libs: [ |
| 248 | "android.car", |
| 249 | ], |
| 250 | product_variables: { |
| 251 | pdk: { |
| 252 | enabled: false, |
| 253 | }, |
| 254 | }, |
| 255 | compile_dex: true, |
| 256 | } |