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
15android_app {
16    name: "CarSettings",
17    overrides: ["Settings"],
18    platform_apis: true,
19
20    srcs: ["src/**/*.java"],
21
22    libs: [
23        "android.car",
24        "telephony-common",
25    ],
26
27    static_libs: [
28        "androidx.car_car",
29        "androidx.lifecycle_lifecycle-common-java8",
30        "androidx.lifecycle_lifecycle-extensions",
31        "androidx.preference_preference",
32        "androidx-constraintlayout_constraintlayout",
33        "car-apps-common",
34        "car-settings-lib",
35        "car-setup-wizard-lib-utils",
36        "SettingsLib",
37        "car-ui-lib",
38        "android.car.userlib",
39        "androidx-constraintlayout_constraintlayout-solver",
40        "jsr305",
41    ],
42
43    certificate: "platform",
44
45    optimize: {
46        enabled: false,
47    },
48
49    privileged: true,
50
51    dex_preopt: {
52        enabled: false,
53    },
54
55    required: ["privapp_whitelist_com.android.car.settings"],
56
57    dxflags: ["--multi-dex"],
58
59    product_variables: {
60        pdk: {
61            enabled: false,
62        },
63    },
64}
65
66// Duplicate of CarSettings which includes testing only resources for Robolectric
67android_app {
68    name: "CarSettingsForTesting",
69    overrides: ["Settings"],
70    platform_apis: true,
71
72    srcs: ["src/**/*.java"],
73
74    libs: [
75        "android.car",
76        "telephony-common",
77    ],
78
79    static_libs: [
80        "androidx.car_car",
81        "androidx.lifecycle_lifecycle-common-java8",
82        "androidx.lifecycle_lifecycle-extensions",
83        "androidx.preference_preference",
84        "androidx-constraintlayout_constraintlayout",
85        "car-apps-common",
86        "car-settings-lib",
87        "car-setup-wizard-lib-utils",
88        "SettingsLib",
89        "car-ui-lib",
90        "android.car.userlib",
91        "androidx-constraintlayout_constraintlayout-solver",
92        "jsr305",
93    ],
94
95    // Testing only resources must be applied last so they take precedence.
96    resource_dirs: [
97        "res",
98        "tests/robotests/res",
99    ],
100
101    certificate: "platform",
102
103    optimize: {
104        enabled: false,
105    },
106
107    privileged: true,
108
109    dex_preopt: {
110        enabled: false,
111    },
112
113    dxflags: ["--multi-dex"],
114
115    product_variables: {
116        pdk: {
117            enabled: false,
118        },
119    },
120}
121
122
123