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 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 50java_library { 51 name: "android.car.cluster.navigation", 52 proto: { 53 type: "lite", 54 }, 55 static_libs: ["libprotobuf-java-lite"], 56 srcs: ["src/android/car/navigation/navigation_state.proto"] 57} 58 59java_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} 82 83stubs_defaults { 84 name: "android.car-docs-default", 85 srcs: [ 86 "src/**/*.java", 87 "src_feature_future/**/*.java", 88 ], 89 libs: [ 90 "android.car", 91 ], 92 product_variables: { 93 pdk: { 94 enabled: false, 95 }, 96 }, 97} 98 99genrule { 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 110genrule { 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 121droidstubs { 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", 127 args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* ", 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 " + 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 ", 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 " + 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 ", 143 }, 144 }, 145} 146 147droidstubs { 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", 153 args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* " + 154 "--show-annotation android.annotation.SystemApi ", 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 " + 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 ", 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 " + 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 ", 170 }, 171 }, 172} 173 174droidstubs { 175 name: "android.car-test-stubs-docs", 176 defaults: ["android.car-docs-default"], 177 api_tag_name: "ANDROID_CAR_SYSTEM", 178 api_filename: "api.txt", 179 removed_api_filename: "removed.txt", 180 args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* " + 181 "--show-annotation android.annotation.TestApi ", 182 installable: false, 183 check_api: { 184 current: { 185 api_file: "api/test-current.txt", 186 removed_api_file: "api/test-removed.txt", 187 args: " -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 " + 188 " -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 " + 189 " -error 21 -error 23 -error 24 -error 25 -hide 113 ", 190 }, 191 }, 192} 193 194droidstubs { 195 name: "android.car-stub-docs", 196 srcs: [ 197 "src/**/*.java", 198 ], 199 libs: [ 200 "android.car", 201 ], 202 api_tag_name: "ANDROID_CAR_STUB", 203 api_filename: "api.txt", 204 args: "--hide UnavailableSymbol --no-docs --stub-packages android.car* ", 205 installable: false, 206 product_variables: { 207 pdk: { 208 enabled: false, 209 }, 210 }, 211} 212 213java_library_static { 214 name: "android.car-stubs", 215 srcs: [ 216 ":android.car-stub-docs", 217 ], 218 libs: [ 219 "android.car", 220 ], 221 product_variables: { 222 pdk: { 223 enabled: false, 224 }, 225 }, 226 compile_dex: true, 227 dist: { 228 targets: ["dist_files"], 229 } 230} 231 232java_library_static { 233 name: "android.car-system-stubs", 234 srcs: [ 235 ":android.car-system-stubs-docs", 236 ], 237 libs: [ 238 "android.car", 239 ], 240 product_variables: { 241 pdk: { 242 enabled: false, 243 }, 244 }, 245 compile_dex: true, 246 dist: { 247 targets: ["dist_files"], 248 } 249} 250 251java_library_static { 252 name: "android.car-test-stubs", 253 srcs: [ 254 ":android.car-test-stubs-docs", 255 ], 256 libs: [ 257 "android.car", 258 ], 259 product_variables: { 260 pdk: { 261 enabled: false, 262 }, 263 }, 264 compile_dex: true, 265} 266