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", "res-overlayable",], 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", 45 "androidx-constraintlayout_constraintlayout", 46 "car-uxr-client-lib" 47 ], 48 49 libs: ["android.car-system-stubs"], 50 51 manifest: "AndroidManifest.xml", 52 53 product_variables: { 54 pdk: { 55 enabled: false, 56 }, 57 }, 58 59 required: ["allowed_privapp_com.android.car.notification"], 60} 61 62// Duplicate of CarNotification which includes testing only resources for Robolectric 63android_app { 64 name: "CarNotificationForRoboTesting", 65 66 srcs: ["src/**/*.java"], 67 68 // Testing only resources must be applied last so they take precedence. 69 resource_dirs: [ 70 "res", 71 "tests/robotests/res", 72 ], 73 74 platform_apis: true, 75 certificate: "platform", 76 privileged: true, 77 78 optimize: { 79 enabled: false, 80 }, 81 82 dex_preopt: { 83 enabled: false, 84 }, 85 86 static_libs: [ 87 "androidx.cardview_cardview", 88 "androidx.recyclerview_recyclerview", 89 "androidx.palette_palette", 90 "car-assist-client-lib", 91 "car-ui-lib", 92 "androidx-constraintlayout_constraintlayout", 93 "car-uxr-client-lib", 94 ], 95 96 libs: ["android.car-system-stubs"], 97 98 product_variables: { 99 pdk: { 100 enabled: false, 101 }, 102 }, 103} 104 105// As Lib 106android_library { 107 name: "CarNotificationLib", 108 srcs: ["src/**/*.java"], 109 110 resource_dirs: ["res"], 111 112 manifest: "AndroidManifest-withoutActivity.xml", 113 114 platform_apis: true, 115 116 optimize: { 117 enabled: false, 118 }, 119 120 dex_preopt: { 121 enabled: false, 122 }, 123 124 static_libs: [ 125 "androidx.cardview_cardview", 126 "androidx.recyclerview_recyclerview", 127 "androidx.palette_palette", 128 "car-assist-client-lib", 129 "car-ui-lib", 130 "androidx-constraintlayout_constraintlayout", 131 "car-uxr-client-lib", 132 ], 133 134 libs: ["android.car-system-stubs"], 135 136 product_variables: { 137 pdk: { 138 enabled: false, 139 }, 140 }, 141} 142 143// Testing lib 144android_library { 145 name: "CarNotificationLibForUnitTesting", 146 147 srcs: [ 148 "src/**/*.java", 149 ], 150 151 // Testing only resources must be applied last so they take precedence. 152 resource_dirs: [ 153 "res", 154 "tests/unit/res", 155 ], 156 157 manifest: "tests/unit/AndroidManifest.xml", 158 159 platform_apis: true, 160 161 optimize: { 162 enabled: false, 163 }, 164 165 dex_preopt: { 166 enabled: false, 167 }, 168 169 static_libs: [ 170 "androidx.cardview_cardview", 171 "androidx.recyclerview_recyclerview", 172 "androidx.palette_palette", 173 "car-assist-client-lib", 174 "car-ui-lib", 175 "androidx-constraintlayout_constraintlayout", 176 "car-uxr-client-lib", 177 ], 178 179 libs: ["android.car-system-stubs"], 180 181 product_variables: { 182 pdk: { 183 enabled: false, 184 }, 185 }, 186 187 dxflags: ["--multi-dex"], 188 189 aaptflags: ["--extra-packages com.android.car.notification"], 190} 191