1// Copyright (C) 2021 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_team: "trendy_team_aaos_framework",
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20apex {
21    name: "com.android.car.framework",
22    defaults: ["com.android.car.framework-defaults"],
23    manifest: "apex_manifest.json",
24}
25
26apex_defaults {
27    bootclasspath_fragments: ["com.android.car.framework-bootclasspath-fragment"],
28    systemserverclasspath_fragments: ["com.android.car.framework-systemserverclasspath-fragment"],
29
30    // TODO(b/202031799) Fix jni dependencies
31    //jni_libs: [
32    //    "libcarservicejni",
33    //],
34
35    apps: [
36        "CarServiceUpdatable",
37        "ScriptExecutor",
38    ],
39    compile_multilib: "both",
40    name: "com.android.car.framework-defaults",
41
42    // TODO(b/288271411): enable it when car mainline module is supported
43    // min_sdk_version: "33",
44    file_contexts: ":com.android.car.framework-file_contexts",
45    key: "com.android.car.framework.key",
46    certificate: ":com.android.car.framework.certificate",
47
48    // TODO(b/202773532) Enable this after all dependencies are resolved.
49    updatable: false,
50}
51
52apex_key {
53    name: "com.android.car.framework.key",
54    public_key: "com.android.car.framework.avbpubkey",
55    private_key: "com.android.car.framework.pem",
56}
57
58android_app_certificate {
59    name: "com.android.car.framework.certificate",
60    // This will use com.android.car.framework.x509.pem (the cert) and
61    // com.android.car.framework.pk8 (the private key)
62    certificate: "com.android.car.framework",
63}
64
65systemserverclasspath_fragment {
66    name: "com.android.car.framework-systemserverclasspath-fragment",
67    contents: ["car-frameworks-service-module"],
68    apex_available: ["com.android.car.framework"],
69}
70
71bootclasspath_fragment {
72    name: "com.android.car.framework-bootclasspath-fragment",
73    contents: ["android.car-module"],
74    apex_available: ["com.android.car.framework"],
75
76    // The bootclasspath_fragments that provide APIs on which this depends.
77    fragments: [
78        {
79            apex: "com.android.art",
80            module: "art-bootclasspath-fragment",
81        },
82        // framework-statsd
83        {
84            apex: "com.android.os.statsd",
85            module: "com.android.os.statsd-bootclasspath-fragment",
86        },
87        // frameworks-wifi
88        {
89            apex: "com.android.wifi",
90            module: "com.android.wifi-bootclasspath-fragment",
91        },
92    ],
93
94    // Additional stubs libraries that this fragment's contents use which are
95    // not provided by another bootclasspath_fragment.
96    additional_stubs: [
97        "android-non-updatable",
98    ],
99    hidden_api: {
100
101        // This module does not contain any split packages.
102        split_packages: [],
103
104        // The following packages currently only contain classes from this
105        // bootclasspath_fragment but some of their sub-packages contain classes
106        // from other bootclasspath modules. Packages should only be listed here
107        // when necessary for legacy purposes, new packages should match a
108        // package prefix.
109        single_packages: [
110            "android.car",
111        ],
112
113        // The following packages and all their subpackages currently only
114        // contain classes from this bootclasspath_fragment. Listing a package
115        // here won't prevent other bootclasspath modules from adding classes in
116        // any of those packages but it will prevent them from adding those
117        // classes into an API surface, e.g. public, system, etc.. Doing so will
118        // result in a build failure due to inconsistent flags.
119        package_prefixes: [
120            "android.car.admin",
121            "android.car.annotation",
122            "android.car.app",
123            "android.car.cluster",
124            "android.car.content",
125            "android.car.diagnostic",
126            "android.car.drivingstate",
127            "android.car.evs",
128            "android.car.hardware",
129            "android.car.input",
130            "android.car.media",
131            "android.car.navigation",
132            "android.car.occupantawareness",
133            "android.car.occupantconnection",
134            "android.car.oem",
135            "android.car.os",
136            "android.car.projection",
137            "android.car.remoteaccess",
138            "android.car.settings",
139            "android.car.storagemonitoring",
140            "android.car.telemetry",
141            "android.car.test",
142            "android.car.user",
143            "android.car.util",
144            "android.car.view",
145            "android.car.vms",
146            "android.car.watchdog",
147            "com.android.car",
148        ],
149    },
150
151}
152