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    required: ["allowed_privapp_com.android.car.notification"],
36
37    dex_preopt: {
38        enabled: false,
39    },
40
41    static_libs: [
42        "androidx.cardview_cardview",
43        "androidx.recyclerview_recyclerview",
44        "androidx.palette_palette",
45        "car-assist-client-lib",
46        "car-ui-lib",
47        "android.car.userlib",
48        "androidx-constraintlayout_constraintlayout",
49        "car-uxr-client-lib"
50    ],
51
52    libs: ["android.car"],
53
54    product_variables: {
55        pdk: {
56            enabled: false,
57        },
58    },
59}
60
61// Duplicate of CarNotification which includes testing only resources for Robolectric
62android_app {
63    name: "CarNotificationForRoboTesting",
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
81    required: ["allowed_privapp_com.android.car.notification"],
82
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",
92        "car-ui-lib",
93        "android.car.userlib",
94        "androidx-constraintlayout_constraintlayout",
95        "car-uxr-client-lib",
96    ],
97
98    libs: ["android.car"],
99
100    product_variables: {
101        pdk: {
102            enabled: false,
103        },
104    },
105}
106
107// As Lib
108android_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: [
127        "androidx.cardview_cardview",
128        "androidx.recyclerview_recyclerview",
129        "androidx.palette_palette",
130        "car-assist-client-lib",
131        "car-ui-lib",
132        "android.car.userlib",
133        "androidx-constraintlayout_constraintlayout",
134        "car-uxr-client-lib",
135    ],
136
137    libs: ["android.car"],
138
139    product_variables: {
140        pdk: {
141            enabled: false,
142        },
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    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}
195