1//
2// Copyright (C) 2018 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20android_library {
21    name: "CarSystemUI-core",
22
23    srcs: [
24        "src/**/*.java",
25        "src/**/I*.aidl",
26    ],
27
28    resource_dirs: [
29        "res-keyguard",
30        "res",
31    ],
32
33    static_libs: [
34        "SystemUI-core",
35        "CarNotificationLib",
36        "SystemUIPluginLib",
37        "SystemUISharedLib",
38        "SettingsLib",
39        "car-admin-ui-lib",
40        "car-ui-lib",
41        "android.car.userlib",
42        "car-qc-lib",
43        "androidx.legacy_legacy-support-v4",
44        "androidx.recyclerview_recyclerview",
45        "androidx.preference_preference",
46        "androidx.appcompat_appcompat",
47        "androidx.mediarouter_mediarouter",
48        "androidx.palette_palette",
49        "androidx.legacy_legacy-preference-v14",
50        "androidx.leanback_leanback",
51        "androidx.slice_slice-core",
52        "androidx.slice_slice-view",
53        "androidx.slice_slice-builders",
54        "androidx.arch.core_core-runtime",
55        "androidx.lifecycle_lifecycle-extensions",
56        "SystemUI-tags",
57        "SystemUI-proto",
58        "dagger2",
59        "//external/kotlinc:kotlin-annotations",
60    ],
61
62    libs: [
63        "android.car",
64    ],
65
66    manifest: "AndroidManifest.xml",
67
68    plugins: ["dagger2-compiler"],
69
70}
71
72android_library {
73    name: "CarSystemUI-tests",
74    manifest: "tests/AndroidManifest.xml",
75    resource_dirs: [
76        "tests/res",
77        "res-keyguard",
78        "res",
79    ],
80    srcs: [
81        "tests/src/**/*.java",
82        "src/**/*.java",
83        "src/**/I*.aidl",
84    ],
85    static_libs: [
86        "SystemUI-tests",
87        "CarNotificationLib",
88        "SystemUIPluginLib",
89        "SystemUISharedLib",
90        "SettingsLib",
91        "android.car.userlib",
92        "androidx.legacy_legacy-support-v4",
93        "androidx.recyclerview_recyclerview",
94        "androidx.preference_preference",
95        "androidx.appcompat_appcompat",
96        "androidx.mediarouter_mediarouter",
97        "androidx.palette_palette",
98        "androidx.legacy_legacy-preference-v14",
99        "androidx.leanback_leanback",
100        "androidx.slice_slice-core",
101        "androidx.slice_slice-view",
102        "androidx.slice_slice-builders",
103        "androidx.arch.core_core-runtime",
104        "androidx.lifecycle_lifecycle-extensions",
105        "car-admin-ui-lib",
106        "car-ui-lib",
107        "car-qc-lib",
108        "SystemUI-tags",
109        "SystemUI-proto",
110        "metrics-helper-lib",
111        "androidx.test.rules", "hamcrest-library",
112        "mockito-target-inline-minus-junit4",
113        "testables",
114        "truth-prebuilt",
115        "dagger2",
116        "//external/kotlinc:kotlin-annotations",
117    ],
118    libs: [
119        "android.test.runner",
120        "android.test.base",
121        "android.car",
122    ],
123
124    aaptflags: [
125        "--extra-packages",
126        "com.android.systemui",
127    ],
128
129    plugins: ["dagger2-compiler"],
130}
131
132android_app {
133    name: "CarSystemUI",
134
135    static_libs: [
136        "CarSystemUI-core",
137    ],
138
139    export_package_resources: true,
140
141    libs: [
142        "android.car",
143    ],
144
145    resource_dirs: [],
146
147     overrides: [
148        "SystemUI",
149    ],
150
151    platform_apis: true,
152    system_ext_specific: true,
153    certificate: "platform",
154    privileged: true,
155
156    optimize: {
157        proguard_flags_files: [
158            "proguard.flags",
159        ],
160    },
161    dxflags: ["--multi-dex"],
162
163    aaptflags: [
164        "--extra-packages",
165        "com.android.keyguard",
166    ],
167
168    kotlincflags: ["-Xjvm-default=enable"],
169
170    plugins: ["dagger2-compiler"],
171
172    required: ["privapp_whitelist_com.android.systemui", "allowed_privapp_com.android.carsystemui"],
173}
174