1// 2// Copyright (C) 2018 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20android_library { 21 name: "CarSystemUI-core", 22 23 srcs: [ 24 "src/**/*.java", 25 "src/**/*.kt", 26 "src/**/I*.aidl", 27 ], 28 29 resource_dirs: [ 30 "res-keyguard", 31 "res", 32 ], 33 34 static_libs: [ 35 "SystemUI-core", 36 "CarNotificationLib", 37 "SystemUIPluginLib", 38 "SystemUISharedLib", 39 "SettingsLib", 40 "car-admin-ui-lib", 41 "car-helper-lib", 42 "car-telephony-common-no-overlayable", 43 "car-ui-lib-no-overlayable", 44 "car-qc-lib", 45 "car-resource-common", 46 "com_android_systemui_car_flags_lib", 47 "androidx.annotation_annotation", 48 "androidx.legacy_legacy-support-v4", 49 "androidx.recyclerview_recyclerview", 50 "androidx.preference_preference", 51 "androidx.appcompat_appcompat", 52 "androidx.mediarouter_mediarouter", 53 "androidx.palette_palette", 54 "androidx.legacy_legacy-preference-v14", 55 "androidx.leanback_leanback", 56 "androidx.slice_slice-core", 57 "androidx.slice_slice-view", 58 "androidx.slice_slice-builders", 59 "androidx.arch.core_core-runtime", 60 "androidx.lifecycle_lifecycle-common-java8", 61 "androidx.lifecycle_lifecycle-extensions", 62 "SystemUI-tags", 63 "SystemUI-proto", 64 "dagger2", 65 "//external/kotlinc:kotlin-annotations", 66 "//frameworks/libs/systemui:animationlib", 67 "CarDockLib", 68 "androidx.test.rules", 69 "car-data-subscription-lib", 70 ], 71 72 libs: [ 73 "android.car", 74 ], 75 76 aaptflags: [ 77 "--no-resource-deduping", 78 ], 79 80 javacflags: ["-Adagger.fastInit=enabled"], 81 82 manifest: "AndroidManifest.xml", 83 84 plugins: ["dagger2-compiler"], 85 // TODO(b/319708040): re-enable use_resource_processor 86 use_resource_processor: false, 87 88} 89 90android_library { 91 name: "CarSystemUI-tests", 92 manifest: "tests/AndroidManifest.xml", 93 resource_dirs: [ 94 "tests/res", 95 "res-keyguard", 96 "res", 97 ], 98 srcs: [ 99 "tests/src/**/*.java", 100 "src/**/*.java", 101 "src/**/*.kt", 102 "src/**/I*.aidl", 103 ], 104 static_libs: [ 105 "SystemUI-tests", 106 "CarNotificationLib", 107 "SystemUIPluginLib", 108 "SystemUISharedLib", 109 "SettingsLib", 110 "android.car.test.utils", 111 "androidx.legacy_legacy-support-v4", 112 "androidx.recyclerview_recyclerview", 113 "androidx.preference_preference", 114 "androidx.appcompat_appcompat", 115 "androidx.mediarouter_mediarouter", 116 "androidx.palette_palette", 117 "androidx.legacy_legacy-preference-v14", 118 "androidx.leanback_leanback", 119 "androidx.slice_slice-core", 120 "androidx.slice_slice-view", 121 "androidx.slice_slice-builders", 122 "androidx.arch.core_core-runtime", 123 "androidx.lifecycle_lifecycle-common-java8", 124 "androidx.lifecycle_lifecycle-extensions", 125 "car-admin-ui-lib", 126 "car-helper-lib", 127 "car-telephony-common-no-overlayable", 128 "car-ui-lib-no-overlayable", 129 "car-qc-lib", 130 "car-resource-common", 131 "com_android_systemui_car_flags_lib", 132 "SystemUI-tags", 133 "SystemUI-proto", 134 "metrics-helper-lib", 135 "androidx.test.rules", 136 "hamcrest-library", 137 "mockito-target-extended-minus-junit4", 138 "flag-junit", 139 "testables", 140 "truth", 141 "testng", 142 "dagger2", 143 "//external/kotlinc:kotlin-annotations", 144 "CarDockLib", 145 "car-data-subscription-lib", 146 147 ], 148 libs: [ 149 "android.test.runner", 150 "android.test.base", 151 "android.car", 152 ], 153 154 aaptflags: [ 155 "--extra-packages", 156 "com.android.systemui", 157 ], 158 159 plugins: ["dagger2-compiler"], 160 161 lint: { 162 test: true, 163 }, 164 165 // TODO(b/218518451) re-enable errorprone. 166 errorprone: { 167 enabled: false, 168 }, 169 // TODO(b/319708040): re-enable use_resource_processor 170 use_resource_processor: false, 171} 172 173android_app { 174 name: "CarSystemUI", 175 176 static_libs: [ 177 "CarSystemUI-core", 178 ], 179 180 export_package_resources: true, 181 182 libs: [ 183 "android.car", 184 ], 185 186 resource_dirs: [], 187 188 overrides: [ 189 "SystemUI", 190 ], 191 192 platform_apis: true, 193 system_ext_specific: true, 194 certificate: "platform", 195 privileged: true, 196 197 optimize: { 198 proguard_flags_files: [ 199 "proguard.flags", 200 ], 201 }, 202 // TODO(b/301283770): Compiling CarSystemUI should not require -J-Xmx8192M 203 javacflags: [ 204 "-J-Xmx8192M", 205 ], 206 dxflags: ["--multi-dex"], 207 208 aaptflags: [ 209 "--extra-packages", 210 "com.android.keyguard", 211 ], 212 213 kotlincflags: ["-Xjvm-default=all"], 214 215 plugins: ["dagger2-compiler"], 216 217 required: [ 218 "privapp_whitelist_com.android.systemui", 219 "allowed_privapp_com.android.carsystemui", 220 ], 221} 222 223// Resource lib 224// To be used ONLY for RROs of CarSystemUI 225android_library { 226 name: "CarSystemUI-res", 227 sdk_version: "system_current", 228 resource_dirs: [ 229 "res-keyguard", 230 "res", 231 ], 232 manifest: "AndroidManifest-res.xml", 233 use_resource_processor: true, 234 static_libs: [ 235 "SystemUI-res", 236 "CarNotification-res", 237 "car-resource-common", 238 "car-ui-lib-no-overlayable", 239 ], 240 lint: { 241 disabled_checks: ["MissingClass"], 242 }, 243} 244