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
22aconfig_declarations {
23    name: "uwb_aconfig_flags",
24    package: "com.android.uwb.flags",
25    container: "com.android.uwb",
26    srcs: ["uwb_flags.aconfig"],
27}
28
29java_aconfig_library {
30    name: "uwb_aconfig_flags_lib",
31    aconfig_declarations: "uwb_aconfig_flags",
32    defaults: ["framework-minus-apex-aconfig-java-defaults"],
33    min_sdk_version: "33",
34    apex_available: [
35        "com.android.uwb",
36    ],
37}
38
39java_library {
40    name: "uwb_flags_lib",
41    sdk_version: "system_current",
42    min_sdk_version: "33",
43    srcs: [
44        "lib/**/*.java",
45    ],
46    static_libs: [
47        "uwb_aconfig_flags_lib",
48    ],
49    apex_available: [
50        "com.android.uwb",
51    ],
52    installable: false,
53    visibility: [
54        "//packages/modules/Uwb:__subpackages__",
55        "//external/uwb:__subpackages__",
56    ],
57}
58
59// The build rules below are currently unused, as usage of "libuwb_aconfig_flags_rust" and
60// "libuwb_aconfig_flags_rust_test" was removed as part of b/329709371.
61rust_aconfig_library {
62    name: "libuwb_aconfig_flags_rust",
63    crate_name: "uwb_aconfig_flags_rust",
64    aconfig_declarations: "uwb_aconfig_flags",
65    min_sdk_version: "33",
66    apex_available: [
67        "//apex_available:platform",
68        "com.android.uwb",
69    ],
70    host_supported: true,
71    visibility: [
72        "//packages/modules/Uwb:__subpackages__",
73        "//external/uwb:__subpackages__",
74    ],
75}
76
77rust_aconfig_library {
78    name: "libuwb_aconfig_flags_rust_test",
79    crate_name: "uwb_aconfig_flags_rust_test",
80    aconfig_declarations: "uwb_aconfig_flags",
81    min_sdk_version: "33",
82    host_supported: true,
83    visibility: [
84        "//packages/modules/Uwb:__subpackages__",
85        "//external/uwb:__subpackages__",
86    ],
87    mode: "test",
88}
89