• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2021 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18    default_team: "trendy_team_fwk_uwb",
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22apex_defaults {
23    name: "com.android.uwb-defaults",
24    bootclasspath_fragments: ["com.android.uwb-bootclasspath-fragment"],
25    systemserverclasspath_fragments: ["com.android.uwb-systemserverclasspath-fragment"],
26    multilib: {
27        both: {
28            jni_libs: [
29                "libuwb_uci_jni_rust",
30            ],
31        },
32    },
33    apps: [
34        "ServiceUwbResources",
35    ],
36    key: "com.android.uwb.key",
37    certificate: ":com.android.uwb.certificate",
38    defaults: ["t-launched-apex-module"],
39}
40
41// Mainline uwb apex module.
42apex {
43    name: "com.android.uwb",
44    defaults: ["com.android.uwb-defaults"],
45    manifest: "apex_manifest.json",
46    visibility: ["//packages/modules/common/build"],
47}
48
49apex_key {
50    name: "com.android.uwb.key",
51    public_key: "com.android.uwb.avbpubkey",
52    private_key: "com.android.uwb.pem",
53}
54
55android_app_certificate {
56    name: "com.android.uwb.certificate",
57    certificate: "com.android.uwb",
58}
59
60sdk {
61    name: "uwb-module-sdk",
62    apexes: [
63        // Adds exportable dependencies of the APEX to the sdk,
64        // e.g. *classpath_fragments.
65        "com.android.uwb",
66    ],
67}
68
69soong_config_module_type {
70    name: "custom_bootclasspath_fragment",
71    module_type: "bootclasspath_fragment",
72    config_namespace: "bootclasspath",
73    bool_variables: [
74        "release_ranging_stack",
75    ],
76    properties: [
77        "contents",
78    ],
79}
80
81// Encapsulate the contributions made by the com.android.uwb to the bootclasspath.
82custom_bootclasspath_fragment {
83    name: "com.android.uwb-bootclasspath-fragment",
84    soong_config_variables: {
85        release_ranging_stack: {
86            contents: [
87                "framework-uwb",
88                "framework-ranging",
89            ],
90            conditions_default: {
91                contents: [
92                    "framework-uwb",
93                ],
94            },
95        },
96    },
97    apex_available: ["com.android.uwb"],
98
99    // The bootclasspath_fragments that provide APIs on which this depends.
100    fragments: [
101        {
102            apex: "com.android.art",
103            module: "art-bootclasspath-fragment",
104        },
105    ],
106
107    // Additional stubs libraries that this fragment's contents use which are
108    // not provided by another bootclasspath_fragment.
109    additional_stubs: [
110        "android-non-updatable",
111    ],
112
113    hidden_api: {
114
115        // The following packages contain classes from other modules on the
116        // bootclasspath. That means that the hidden API flags for this module
117        // has to explicitly list every single class this module provides in
118        // that package to differentiate them from the classes provided by other
119        // modules. That can include private classes that are not part of the
120        // API.
121        split_packages: [
122            "android.uwb",
123            "android.ranging",
124            "android.ranging.ble.cs",
125            "android.ranging.ble.rssi",
126            "android.ranging.oob",
127            "android.ranging.raw",
128            "android.ranging.uwb",
129            "android.ranging.wifi.rtt",
130        ],
131
132        // The following packages and all their subpackages currently only
133        // contain classes from this bootclasspath_fragment. Listing a package
134        // here won't prevent other bootclasspath modules from adding classes in
135        // any of those packages but it will prevent them from adding those
136        // classes into an API surface, e.g. public, system, etc.. Doing so will
137        // result in a build failure due to inconsistent flags.
138        package_prefixes: [
139            "com.android.x",
140            "android.uwb.util",
141        ],
142    },
143}
144
145soong_config_module_type {
146    name: "custom_systemserverclasspath_fragment",
147    module_type: "systemserverclasspath_fragment",
148    config_namespace: "bootclasspath",
149    bool_variables: [
150        "release_ranging_stack",
151    ],
152    properties: [
153        "standalone_contents",
154    ],
155}
156
157custom_systemserverclasspath_fragment {
158    name: "com.android.uwb-systemserverclasspath-fragment",
159    soong_config_variables: {
160        release_ranging_stack: {
161            standalone_contents: [
162                "service-uwb",
163                "service-ranging",
164            ],
165            conditions_default: {
166                standalone_contents: [
167                    "service-uwb",
168                ],
169            },
170        },
171    },
172    apex_available: ["com.android.uwb"],
173}
174