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 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20android_app { 21 name: "CarNotification", 22 23 srcs: ["src/**/*.java"], 24 25 resource_dirs: ["res"], 26 27 platform_apis: true, 28 certificate: "platform", 29 privileged: true, 30 31 optimize: { 32 enabled: false, 33 }, 34 35 dex_preopt: { 36 enabled: false, 37 }, 38 39 static_libs: [ 40 "androidx.cardview_cardview", 41 "androidx.recyclerview_recyclerview", 42 "androidx.palette_palette", 43 "car-assist-client-lib", 44 "car-ui-lib-no-overlayable", 45 "car-resource-common", 46 "androidx-constraintlayout_constraintlayout", 47 "car-uxr-client-lib-no-overlayable", 48 ], 49 50 libs: ["android.car-system-stubs"], 51 52 manifest: "AndroidManifest.xml", 53 54 required: ["allowed_privapp_com.android.car.notification"], 55} 56 57// Duplicate of CarNotification which includes testing only resources for Robolectric 58android_app { 59 name: "CarNotificationForRoboTesting", 60 61 srcs: ["src/**/*.java"], 62 63 // Testing only resources must be applied last so they take precedence. 64 resource_dirs: [ 65 "res", 66 "tests/robotests/res", 67 ], 68 69 platform_apis: true, 70 certificate: "platform", 71 privileged: true, 72 73 optimize: { 74 enabled: false, 75 }, 76 77 dex_preopt: { 78 enabled: false, 79 }, 80 81 static_libs: [ 82 "androidx.cardview_cardview", 83 "androidx.recyclerview_recyclerview", 84 "androidx.palette_palette", 85 "car-assist-client-lib", 86 "car-ui-lib-no-overlayable", 87 "car-resource-common", 88 "androidx-constraintlayout_constraintlayout", 89 "car-uxr-client-lib-no-overlayable", 90 ], 91 92 libs: ["android.car-system-stubs"], 93} 94 95// As Lib 96android_library { 97 name: "CarNotificationLib", 98 srcs: ["src/**/*.java"], 99 100 resource_dirs: ["res"], 101 102 manifest: "AndroidManifest-withoutActivity.xml", 103 104 optimize: { 105 enabled: false, 106 }, 107 108 dex_preopt: { 109 enabled: false, 110 }, 111 112 static_libs: [ 113 "androidx.cardview_cardview", 114 "androidx.recyclerview_recyclerview", 115 "androidx.palette_palette", 116 "car-assist-client-lib", 117 "car-ui-lib-no-overlayable", 118 "car-resource-common", 119 "androidx-constraintlayout_constraintlayout", 120 "car-uxr-client-lib-no-overlayable", 121 ], 122 123 libs: ["android.car-system-stubs"], 124 // TODO(b/319708040): re-enable use_resource_processor 125 use_resource_processor: false, 126} 127 128// Resource lib 129// To be used ONLY for RROs of CarNotification and CarSystemUI 130android_library { 131 name: "CarNotification-res", 132 sdk_version: "system_current", 133 resource_dirs: ["res"], 134 manifest: "AndroidManifest-res.xml", 135 use_resource_processor: true, 136 static_libs: [ 137 "car-resource-common", 138 "car-ui-lib-no-overlayable", 139 "car-uxr-client-lib-no-overlayable", 140 ], 141 lint: { 142 disabled_checks: ["MissingClass"], 143 }, 144} 145 146// Testing lib 147android_library { 148 name: "CarNotificationLibForUnitTesting", 149 150 srcs: [ 151 "src/**/*.java", 152 ], 153 154 // Testing only resources must be applied last so they take precedence. 155 resource_dirs: [ 156 "res", 157 "tests/unit/res", 158 ], 159 160 manifest: "tests/unit/AndroidManifest.xml", 161 162 optimize: { 163 enabled: false, 164 }, 165 166 dex_preopt: { 167 enabled: false, 168 }, 169 170 static_libs: [ 171 "androidx.cardview_cardview", 172 "androidx.recyclerview_recyclerview", 173 "androidx.palette_palette", 174 "car-assist-client-lib", 175 "car-ui-lib-no-overlayable", 176 "car-resource-common", 177 "androidx-constraintlayout_constraintlayout", 178 "car-uxr-client-lib-no-overlayable", 179 ], 180 181 libs: ["android.car-system-stubs"], 182 183 dxflags: ["--multi-dex"], 184 185 aaptflags: ["--extra-packages com.android.car.notification"], 186 // TODO(b/319708040): re-enable use_resource_processor 187 use_resource_processor: false, 188} 189