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 | |
| 35 | dex_preopt: { |
| 36 | enabled: false, |
| 37 | }, |
| 38 | |
| 39 | static_libs: [ |
Heemin Seog | d66bad5 | 2019-03-15 16:43:11 -0700 | [diff] [blame] | 40 | "androidx.cardview_cardview", |
| 41 | "androidx.recyclerview_recyclerview", |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 42 | "androidx.palette_palette", |
Uriel Sade | 48e479e | 2018-12-03 10:50:29 -0800 | [diff] [blame] | 43 | "car-assist-client-lib", |
Danny Epstein | 1b080de | 2020-05-19 20:22:49 -0700 | [diff] [blame] | 44 | "car-ui-lib", |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 45 | "android.car.userlib", |
Alex Stetson | 30dbdac | 2020-07-16 14:10:44 -0700 | [diff] [blame] | 46 | "androidx-constraintlayout_constraintlayout", |
| 47 | "car-uxr-client-lib" |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 48 | ], |
| 49 | |
| 50 | libs: ["android.car"], |
| 51 | |
| 52 | product_variables: { |
| 53 | pdk: { |
| 54 | enabled: false, |
| 55 | }, |
| 56 | }, |
| 57 | } |
| 58 | |
Priyank Singh | 98d2081 | 2019-06-19 14:01:08 -0700 | [diff] [blame] | 59 | // Duplicate of CarNotification which includes testing only resources for Robolectric |
| 60 | android_app { |
Abhijoy Saha | 3f4fa20 | 2020-10-29 21:12:57 +0000 | [diff] [blame] | 61 | name: "CarNotificationForRoboTesting", |
Priyank Singh | 98d2081 | 2019-06-19 14:01:08 -0700 | [diff] [blame] | 62 | |
| 63 | srcs: ["src/**/*.java"], |
| 64 | |
| 65 | // Testing only resources must be applied last so they take precedence. |
| 66 | resource_dirs: [ |
| 67 | "res", |
| 68 | "tests/robotests/res", |
| 69 | ], |
| 70 | |
| 71 | platform_apis: true, |
| 72 | certificate: "platform", |
| 73 | privileged: true, |
| 74 | |
| 75 | optimize: { |
| 76 | enabled: false, |
| 77 | }, |
| 78 | |
| 79 | dex_preopt: { |
| 80 | enabled: false, |
| 81 | }, |
| 82 | |
| 83 | static_libs: [ |
| 84 | "androidx.cardview_cardview", |
| 85 | "androidx.recyclerview_recyclerview", |
| 86 | "androidx.palette_palette", |
| 87 | "car-assist-client-lib", |
Danny Epstein | 1b080de | 2020-05-19 20:22:49 -0700 | [diff] [blame] | 88 | "car-ui-lib", |
Priyank Singh | 98d2081 | 2019-06-19 14:01:08 -0700 | [diff] [blame] | 89 | "android.car.userlib", |
Alex Stetson | 30dbdac | 2020-07-16 14:10:44 -0700 | [diff] [blame] | 90 | "androidx-constraintlayout_constraintlayout", |
| 91 | "car-uxr-client-lib", |
Priyank Singh | 98d2081 | 2019-06-19 14:01:08 -0700 | [diff] [blame] | 92 | ], |
| 93 | |
| 94 | libs: ["android.car"], |
| 95 | |
| 96 | product_variables: { |
| 97 | pdk: { |
| 98 | enabled: false, |
| 99 | }, |
| 100 | }, |
| 101 | } |
| 102 | |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 103 | // As Lib |
| 104 | android_library { |
| 105 | name: "CarNotificationLib", |
| 106 | srcs: ["src/**/*.java"], |
| 107 | |
| 108 | resource_dirs: ["res"], |
| 109 | |
| 110 | manifest: "AndroidManifest-withoutActivity.xml", |
| 111 | |
| 112 | platform_apis: true, |
| 113 | |
| 114 | optimize: { |
| 115 | enabled: false, |
| 116 | }, |
| 117 | |
| 118 | dex_preopt: { |
| 119 | enabled: false, |
| 120 | }, |
| 121 | |
| 122 | static_libs: [ |
Heemin Seog | d66bad5 | 2019-03-15 16:43:11 -0700 | [diff] [blame] | 123 | "androidx.cardview_cardview", |
| 124 | "androidx.recyclerview_recyclerview", |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 125 | "androidx.palette_palette", |
Uriel Sade | 48e479e | 2018-12-03 10:50:29 -0800 | [diff] [blame] | 126 | "car-assist-client-lib", |
Danny Epstein | c49e7b8 | 2020-08-05 15:26:03 -0700 | [diff] [blame] | 127 | "car-ui-lib", |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 128 | "android.car.userlib", |
Alex Stetson | 30dbdac | 2020-07-16 14:10:44 -0700 | [diff] [blame] | 129 | "androidx-constraintlayout_constraintlayout", |
| 130 | "car-uxr-client-lib", |
Brad Stenning | fb19813 | 2018-12-12 13:33:14 -0800 | [diff] [blame] | 131 | ], |
| 132 | |
| 133 | libs: ["android.car"], |
| 134 | |
| 135 | product_variables: { |
| 136 | pdk: { |
| 137 | enabled: false, |
| 138 | }, |
| 139 | }, |
| 140 | } |
Heemin Seog | a6471ac | 2020-11-11 17:23:45 -0800 | [diff] [blame] | 141 | |
| 142 | // Testing lib |
| 143 | android_library { |
| 144 | name: "CarNotificationLibForUnitTesting", |
| 145 | |
| 146 | srcs: [ |
| 147 | "src/**/*.java", |
| 148 | ], |
| 149 | |
| 150 | // Testing only resources must be applied last so they take precedence. |
| 151 | resource_dirs: [ |
| 152 | "res", |
| 153 | "tests/unit/res", |
| 154 | ], |
| 155 | |
| 156 | manifest: "tests/unit/AndroidManifest.xml", |
| 157 | |
| 158 | platform_apis: true, |
| 159 | |
| 160 | optimize: { |
| 161 | enabled: false, |
| 162 | }, |
| 163 | |
| 164 | dex_preopt: { |
| 165 | enabled: false, |
| 166 | }, |
| 167 | |
| 168 | static_libs: [ |
| 169 | "androidx.cardview_cardview", |
| 170 | "androidx.recyclerview_recyclerview", |
| 171 | "androidx.palette_palette", |
| 172 | "car-assist-client-lib", |
| 173 | "car-ui-lib", |
| 174 | "android.car.userlib", |
| 175 | "androidx-constraintlayout_constraintlayout", |
| 176 | "car-uxr-client-lib", |
| 177 | ], |
| 178 | |
| 179 | libs: ["android.car"], |
| 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 | } |