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
20genrule {
21    name: "statslog-carlauncher-java-gen",
22    tools: ["stats-log-api-gen"],
23    cmd: "$(location stats-log-api-gen) --java $(out) --module carlauncher" +
24        " --javaPackage com.android.car.carlauncher --javaClass CarLauncherStatsLog",
25    out: ["com/android/car/carlauncher/CarLauncherStatsLog.java"],
26}
27
28carlauncher_srcs = [
29    "src/**/*.java",
30    ":statslog-carlauncher-java-gen",
31]
32
33android_library {
34    name: "CarLauncher-core",
35
36    srcs: carlauncher_srcs,
37
38    resource_dirs: ["res"],
39
40    static_libs: [
41        "car_launcher_flags_java_lib",
42        "androidx-constraintlayout_constraintlayout-solver",
43        "androidx-constraintlayout_constraintlayout",
44        "androidx.lifecycle_lifecycle-extensions",
45        "car-media-common",
46        "car-qc-lib",
47        "car-telephony-common",
48        "car-ui-lib",
49        "com.google.android.material_material",
50        "WindowManager-Shell",
51        "CarAppGrid-lib",
52        "SystemUISharedLib",
53        "android.car.cluster.navigation",
54        "car-resource-common",
55    ],
56
57    libs: ["android.car"],
58
59    manifest: "AndroidManifest.xml",
60    // TODO(b/319708040): re-enable use_resource_processor
61    use_resource_processor: false,
62}
63
64android_app {
65    name: "CarLauncher",
66
67    resource_dirs: [],
68
69    srcs: carlauncher_srcs,
70
71    platform_apis: true,
72
73    required: ["allowed_privapp_com.android.car.carlauncher"],
74
75    certificate: "platform",
76
77    privileged: true,
78
79    overrides: [
80        "Launcher2",
81        "Launcher3",
82        "Launcher3QuickStep",
83    ],
84
85    static_libs: ["CarLauncher-core"],
86
87    libs: ["android.car"],
88
89    optimize: {
90        enabled: false,
91    },
92
93    dex_preopt: {
94        enabled: false,
95    },
96    // TODO(b/319708040): re-enable use_resource_processor
97    use_resource_processor: false,
98}
99
100aconfig_declarations {
101    name: "car_launcher_flags",
102    package: "com.android.car.carlauncher",
103    container: "system",
104    srcs: ["car_launcher_flags.aconfig"],
105}
106
107java_aconfig_library {
108    name: "car_launcher_flags_java_lib",
109    aconfig_declarations: "car_launcher_flags",
110}
111