Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [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 | |
Bob Badour | b8e19a9 | 2021-02-12 21:18:59 -0800 | [diff] [blame] | 16 | package { |
| 17 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 18 | } |
| 19 | |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 20 | android_app { |
| 21 | name: "CarNotification", |
| 22 | |
| 23 | srcs: ["src/**/*.java"], |
| 24 | |
Julia Kawano | e4d8710 | 2021-06-04 09:50:54 -1000 | [diff] [blame] | 25 | resource_dirs: ["res", "res-overlayable",], |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 26 | |
| 27 | platform_apis: true, |
Uriel Sade | fc34718 | 2019-01-10 14:12:28 -0800 | [diff] [blame] | 28 | certificate: "platform", |
| 29 | privileged: true, |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 30 | |
| 31 | optimize: { |
| 32 | enabled: false, |
| 33 | }, |
| 34 | |
Heemin Seog | 652b82e | 2021-07-28 13:14:35 +0000 | [diff] [blame] | 35 | required: ["allowed_privapp_com.android.car.notification"], |
| 36 | |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 37 | dex_preopt: { |
| 38 | enabled: false, |
| 39 | }, |
| 40 | |
| 41 | static_libs: [ |
Heemin Seog | d66bad5 | 2019-03-15 16:43:11 -0700 | [diff] [blame] | 42 | "androidx.cardview_cardview", |
| 43 | "androidx.recyclerview_recyclerview", |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 44 | "androidx.palette_palette", |
Uriel Sade | 48e479e | 2018-12-03 10:50:29 -0800 | [diff] [blame] | 45 | "car-assist-client-lib", |
Danny Epstein | 1b080de | 2020-05-19 20:22:49 -0700 | [diff] [blame] | 46 | "car-ui-lib", |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 47 | "android.car.userlib", |
Alex Stetson | 30dbdac | 2020-07-16 14:10:44 -0700 | [diff] [blame] | 48 | "androidx-constraintlayout_constraintlayout", |
| 49 | "car-uxr-client-lib" |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 50 | ], |
| 51 | |
| 52 | libs: ["android.car"], |
| 53 | |
| 54 | product_variables: { |
| 55 | pdk: { |
| 56 | enabled: false, |
| 57 | }, |
| 58 | }, |
| 59 | } |
| 60 | |
Priyank Singh | 98d2081 | 2019-06-19 14:01:08 -0700 | [diff] [blame] | 61 | // Duplicate of CarNotification which includes testing only resources for Robolectric |
| 62 | android_app { |
Abhijoy Saha | 3f4fa20 | 2020-10-29 21:12:57 +0000 | [diff] [blame] | 63 | name: "CarNotificationForRoboTesting", |
Priyank Singh | 98d2081 | 2019-06-19 14:01:08 -0700 | [diff] [blame] | 64 | |
| 65 | srcs: ["src/**/*.java"], |
| 66 | |
| 67 | // Testing only resources must be applied last so they take precedence. |
| 68 | resource_dirs: [ |
| 69 | "res", |
| 70 | "tests/robotests/res", |
| 71 | ], |
| 72 | |
| 73 | platform_apis: true, |
| 74 | certificate: "platform", |
| 75 | privileged: true, |
| 76 | |
| 77 | optimize: { |
| 78 | enabled: false, |
| 79 | }, |
| 80 | |
Heemin Seog | 652b82e | 2021-07-28 13:14:35 +0000 | [diff] [blame] | 81 | required: ["allowed_privapp_com.android.car.notification"], |
| 82 | |
Priyank Singh | 98d2081 | 2019-06-19 14:01:08 -0700 | [diff] [blame] | 83 | dex_preopt: { |
| 84 | enabled: false, |
| 85 | }, |
| 86 | |
| 87 | static_libs: [ |
| 88 | "androidx.cardview_cardview", |
| 89 | "androidx.recyclerview_recyclerview", |
| 90 | "androidx.palette_palette", |
| 91 | "car-assist-client-lib", |
Danny Epstein | 1b080de | 2020-05-19 20:22:49 -0700 | [diff] [blame] | 92 | "car-ui-lib", |
Priyank Singh | 98d2081 | 2019-06-19 14:01:08 -0700 | [diff] [blame] | 93 | "android.car.userlib", |
Alex Stetson | 30dbdac | 2020-07-16 14:10:44 -0700 | [diff] [blame] | 94 | "androidx-constraintlayout_constraintlayout", |
| 95 | "car-uxr-client-lib", |
Priyank Singh | 98d2081 | 2019-06-19 14:01:08 -0700 | [diff] [blame] | 96 | ], |
| 97 | |
| 98 | libs: ["android.car"], |
| 99 | |
| 100 | product_variables: { |
| 101 | pdk: { |
| 102 | enabled: false, |
| 103 | }, |
| 104 | }, |
| 105 | } |
| 106 | |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 107 | // As Lib |
| 108 | android_library { |
| 109 | name: "CarNotificationLib", |
| 110 | srcs: ["src/**/*.java"], |
| 111 | |
| 112 | resource_dirs: ["res"], |
| 113 | |
| 114 | manifest: "AndroidManifest-withoutActivity.xml", |
| 115 | |
| 116 | platform_apis: true, |
| 117 | |
| 118 | optimize: { |
| 119 | enabled: false, |
| 120 | }, |
| 121 | |
| 122 | dex_preopt: { |
| 123 | enabled: false, |
| 124 | }, |
| 125 | |
| 126 | static_libs: [ |
Heemin Seog | d66bad5 | 2019-03-15 16:43:11 -0700 | [diff] [blame] | 127 | "androidx.cardview_cardview", |
| 128 | "androidx.recyclerview_recyclerview", |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 129 | "androidx.palette_palette", |
Uriel Sade | 48e479e | 2018-12-03 10:50:29 -0800 | [diff] [blame] | 130 | "car-assist-client-lib", |
Danny Epstein | c49e7b8 | 2020-08-05 15:26:03 -0700 | [diff] [blame] | 131 | "car-ui-lib", |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 132 | "android.car.userlib", |
Alex Stetson | 30dbdac | 2020-07-16 14:10:44 -0700 | [diff] [blame] | 133 | "androidx-constraintlayout_constraintlayout", |
| 134 | "car-uxr-client-lib", |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 135 | ], |
| 136 | |
| 137 | libs: ["android.car"], |
| 138 | |
| 139 | product_variables: { |
| 140 | pdk: { |
| 141 | enabled: false, |
| 142 | }, |
| 143 | }, |
| 144 | } |
Heemin Seog | a6471ac | 2020-11-11 17:23:45 -0800 | [diff] [blame] | 145 | |
| 146 | // Testing lib |
| 147 | android_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 | platform_apis: true, |
| 163 | |
| 164 | optimize: { |
| 165 | enabled: false, |
| 166 | }, |
| 167 | |
| 168 | dex_preopt: { |
| 169 | enabled: false, |
| 170 | }, |
| 171 | |
| 172 | static_libs: [ |
| 173 | "androidx.cardview_cardview", |
| 174 | "androidx.recyclerview_recyclerview", |
| 175 | "androidx.palette_palette", |
| 176 | "car-assist-client-lib", |
| 177 | "car-ui-lib", |
| 178 | "android.car.userlib", |
| 179 | "androidx-constraintlayout_constraintlayout", |
| 180 | "car-uxr-client-lib", |
| 181 | ], |
| 182 | |
| 183 | libs: ["android.car"], |
| 184 | |
| 185 | product_variables: { |
| 186 | pdk: { |
| 187 | enabled: false, |
| 188 | }, |
| 189 | }, |
| 190 | |
| 191 | dxflags: ["--multi-dex"], |
| 192 | |
| 193 | aaptflags: ["--extra-packages com.android.car.notification"], |
| 194 | } |