blob: 2d9873aac6e80d7fbb90583caf6e0af299fc5354 [file] [log] [blame]
Heemin Seog7024b372019-06-11 17:03:01 -07001// Copyright (C) 2019 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
Bob Badour14d689a2021-03-02 00:29:18 -080015package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
Heemin Seog10d7fe12021-05-13 11:30:45 -070019android_library {
20 name: "CarSettings-core",
Heemin Seog7024b372019-06-11 17:03:01 -070021 platform_apis: true,
Eric Berglund4c85eb32020-04-20 11:58:16 -070022 defaults: [
23 "SettingsLibDefaults",
24 "SettingsLib-search-defaults",
25 ],
Heemin Seog7024b372019-06-11 17:03:01 -070026
27 srcs: ["src/**/*.java"],
28
Heemin Seog7024b372019-06-11 17:03:01 -070029 static_libs: [
30 "androidx.lifecycle_lifecycle-common-java8",
31 "androidx.lifecycle_lifecycle-extensions",
32 "androidx.preference_preference",
33 "androidx-constraintlayout_constraintlayout",
JianYang Liu7699d2b2020-01-06 15:36:48 -080034 "androidx.test.core",
Colin Cross3bfc45f2020-01-08 11:11:26 -080035 "car-apps-common",
Heemin Seog7024b372019-06-11 17:03:01 -070036 "car-setup-wizard-lib-utils",
Quang Luongb2a1b422021-06-10 13:38:49 -070037 "WifiTrackerLib",
Heemin Seog7024b372019-06-11 17:03:01 -070038 "SettingsLib",
Eric Berglund4c85eb32020-04-20 11:58:16 -070039 "SettingsLib-search",
Heemin Seog7024b372019-06-11 17:03:01 -070040 "androidx-constraintlayout_constraintlayout-solver",
41 "jsr305",
Colin Cross3bfc45f2020-01-08 11:11:26 -080042 "car-ui-lib",
Felipe Leme41526be2020-12-16 18:21:40 -080043 "car-admin-ui-lib",
Mayank Garg861980c2022-02-01 16:48:47 -080044 "car-helper-lib",
Alex Stetson68a66592021-07-28 09:13:30 -070045 "car-qc-lib",
Heemin Seog7024b372019-06-11 17:03:01 -070046 ],
47
Heemin Seog10d7fe12021-05-13 11:30:45 -070048 libs: [
49 "android.car",
50 ],
51
52 manifest: "AndroidManifest.xml",
53 resource_dirs: ["res"],
54}
55
56android_app {
57 name: "CarSettings",
58 overrides: ["Settings"],
59 platform_apis: true,
60
61 static_libs: [
62 "CarSettings-core",
63 ],
64
eschiangbb088512022-06-01 11:53:25 -070065 libs: [
66 "android.car",
67 ],
68
Heemin Seog7024b372019-06-11 17:03:01 -070069 certificate: "platform",
70
71 optimize: {
eschiangbb088512022-06-01 11:53:25 -070072 proguard_flags_files: ["proguard.flags"],
Heemin Seog7024b372019-06-11 17:03:01 -070073 },
74
75 privileged: true,
76
77 dex_preopt: {
78 enabled: false,
79 },
80
Yan Zhu70b13182020-08-14 09:23:15 -070081 required: ["allowed_privapp_com.android.car.settings"],
Heemin Seog7024b372019-06-11 17:03:01 -070082
83 dxflags: ["--multi-dex"],
84
85 product_variables: {
86 pdk: {
87 enabled: false,
88 },
89 },
90}
91
92// Duplicate of CarSettings which includes testing only resources for Robolectric
93android_app {
94 name: "CarSettingsForTesting",
Heemin Seog7024b372019-06-11 17:03:01 -070095 platform_apis: true,
Eric Berglund4c85eb32020-04-20 11:58:16 -070096 defaults: [
97 "SettingsLibDefaults",
98 "SettingsLib-search-defaults",
99 ],
Heemin Seog7024b372019-06-11 17:03:01 -0700100
101 srcs: ["src/**/*.java"],
102
103 libs: [
104 "android.car",
Heemin Seog7024b372019-06-11 17:03:01 -0700105 ],
106
107 static_libs: [
108 "androidx.lifecycle_lifecycle-common-java8",
109 "androidx.lifecycle_lifecycle-extensions",
110 "androidx.preference_preference",
111 "androidx-constraintlayout_constraintlayout",
JianYang Liu7699d2b2020-01-06 15:36:48 -0800112 "androidx.test.core",
Colin Cross3bfc45f2020-01-08 11:11:26 -0800113 "car-apps-common",
Heemin Seog7024b372019-06-11 17:03:01 -0700114 "car-setup-wizard-lib-utils",
Quang Luongb2a1b422021-06-10 13:38:49 -0700115 "WifiTrackerLib",
Heemin Seog7024b372019-06-11 17:03:01 -0700116 "SettingsLib",
Eric Berglund4c85eb32020-04-20 11:58:16 -0700117 "SettingsLib-search",
Heemin Seog7024b372019-06-11 17:03:01 -0700118 "androidx-constraintlayout_constraintlayout-solver",
119 "jsr305",
Saeid Farivar Asanjanf09e1f12020-04-21 08:24:58 -0700120 "car-ui-lib-testing-support",
Felipe Lemedf7914d2021-01-05 14:01:02 -0800121 "car-admin-ui-lib",
Mayank Garg861980c2022-02-01 16:48:47 -0800122 "car-helper-lib",
Alex Stetson68a66592021-07-28 09:13:30 -0700123 "car-qc-lib",
Heemin Seog7024b372019-06-11 17:03:01 -0700124 ],
125
126 // Testing only resources must be applied last so they take precedence.
127 resource_dirs: [
128 "res",
129 "tests/robotests/res",
130 ],
131
132 certificate: "platform",
133
134 optimize: {
135 enabled: false,
136 },
137
138 privileged: true,
139
140 dex_preopt: {
141 enabled: false,
142 },
143
144 dxflags: ["--multi-dex"],
145
146 product_variables: {
147 pdk: {
148 enabled: false,
149 },
150 },
151}
Alex Stetson828628d2020-11-24 12:28:29 -0800152
153android_library {
154 name: "CarSettingsForUnitTesting",
155 platform_apis: true,
156 defaults: [
157 "SettingsLibDefaults",
158 "SettingsLib-search-defaults",
159 ],
160
161 manifest: "tests/unit/AndroidManifest.xml",
162
163 srcs: ["src/**/*.java"],
164
165 libs: [
166 "android.car",
167 ],
168
169 static_libs: [
170 "androidx.lifecycle_lifecycle-common-java8",
171 "androidx.lifecycle_lifecycle-extensions",
172 "androidx.preference_preference",
173 "androidx-constraintlayout_constraintlayout",
174 "car-apps-common",
175 "car-setup-wizard-lib-utils",
Quang Luongb2a1b422021-06-10 13:38:49 -0700176 "WifiTrackerLib",
Alex Stetson828628d2020-11-24 12:28:29 -0800177 "SettingsLib",
178 "SettingsLib-search",
Alex Stetson828628d2020-11-24 12:28:29 -0800179 "androidx-constraintlayout_constraintlayout-solver",
180 "jsr305",
181 "car-ui-lib-testing-support",
Felipe Lemedf7914d2021-01-05 14:01:02 -0800182 "car-admin-ui-lib",
Mayank Garg861980c2022-02-01 16:48:47 -0800183 "car-helper-lib",
Alex Stetson68a66592021-07-28 09:13:30 -0700184 "car-qc-lib",
Alex Stetson828628d2020-11-24 12:28:29 -0800185 ],
186
187 // Testing only resources must be applied last so they take precedence.
188 resource_dirs: [
189 "res",
190 "tests/unit/res",
191 ],
192
193 optimize: {
194 enabled: false,
195 },
196
197 dex_preopt: {
198 enabled: false,
199 },
200
201 dxflags: ["--multi-dex"],
202
203 aaptflags: ["--extra-packages com.android.car.settings"],
204
205 product_variables: {
206 pdk: {
207 enabled: false,
208 },
209 },
210}