• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// 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
15package {
16    default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19android_library {
20    name: "CarSettings-core",
21    platform_apis: true,
22    defaults: [
23        "SettingsLibDefaults",
24        "SettingsLib-search-defaults",
25    ],
26
27    srcs: ["src/**/*.java"],
28
29    static_libs: [
30        "androidx.lifecycle_lifecycle-common-java8",
31        "androidx.lifecycle_lifecycle-extensions",
32        "androidx.preference_preference",
33        "androidx-constraintlayout_constraintlayout",
34        "androidx.test.core",
35        "car-apps-common",
36        "car-setup-wizard-lib-utils",
37        "WifiTrackerLib",
38        "SettingsLib",
39        "SettingsLib-search",
40        "androidx-constraintlayout_constraintlayout-solver",
41        "jsr305",
42        "car-ui-lib",
43        "car-admin-ui-lib",
44        "car-helper-lib",
45        "car-qc-lib",
46    ],
47
48    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
65    libs: [
66        "android.car",
67    ],
68
69    certificate: "platform",
70
71    optimize: {
72        proguard_flags_files: ["proguard.flags"],
73    },
74
75    privileged: true,
76
77    dex_preopt: {
78        enabled: false,
79    },
80
81    required: ["allowed_privapp_com.android.car.settings"],
82
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",
95    platform_apis: true,
96    defaults: [
97        "SettingsLibDefaults",
98        "SettingsLib-search-defaults",
99    ],
100
101    srcs: ["src/**/*.java"],
102
103    libs: [
104        "android.car",
105    ],
106
107    static_libs: [
108        "androidx.lifecycle_lifecycle-common-java8",
109        "androidx.lifecycle_lifecycle-extensions",
110        "androidx.preference_preference",
111        "androidx-constraintlayout_constraintlayout",
112        "androidx.test.core",
113        "car-apps-common",
114        "car-setup-wizard-lib-utils",
115        "WifiTrackerLib",
116        "SettingsLib",
117        "SettingsLib-search",
118        "androidx-constraintlayout_constraintlayout-solver",
119        "jsr305",
120        "car-ui-lib-testing-support",
121        "car-admin-ui-lib",
122        "car-helper-lib",
123        "car-qc-lib",
124    ],
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}
152
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",
176        "WifiTrackerLib",
177        "SettingsLib",
178        "SettingsLib-search",
179        "androidx-constraintlayout_constraintlayout-solver",
180        "jsr305",
181        "car-ui-lib-testing-support",
182        "car-admin-ui-lib",
183        "car-helper-lib",
184        "car-qc-lib",
185    ],
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}
211
212filegroup {
213    name: "CarSettings_proguard_flags",
214    srcs: ["proguard.flags"],
215}
216
217