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
20java_defaults {
21    name: "android.car.builtin-defaults",
22
23    srcs: [
24        "src/**/*.java",
25        "src/**/*.aidl",
26        "src/android/car/builtin/util/EventLogTags.logtags",
27    ],
28
29    default_to_stubs: true,
30
31    shared_library: false, // Added to bootclasspath
32
33    api_lint: {
34        enabled: true,
35    },
36
37    // First release, not enabled.
38    unsafe_ignore_missing_latest_api: true,
39
40    // TODO(202212484): Allows car-builtin-lib access to @hide Bluetooth APIs
41    sdk_version: "core_platform",
42
43    libs: [
44        // TODO(202212484): The following two allow car-builtin-lib access to @hide Bluetooth APIs
45        "framework-bluetooth.impl",
46        "framework",
47    ],
48
49    stub_only_libs: [
50        "framework-annotations-lib",
51    ],
52}
53
54// This library is internal only and should not be used outside core car stack.
55java_sdk_library {
56    name: "android.car.builtin",
57
58    defaults: ["android.car.builtin-defaults"],
59
60    public: {
61        libs: [
62            "framework-bluetooth.stubs",
63        ],
64    },
65    test: {
66        enabled: false,
67    },
68    system: {
69        enabled: true,
70        sdk_version: "module_current",
71        libs: [
72            "framework-bluetooth.stubs.module_lib",
73        ],
74    },
75    module_lib: {
76        enabled: true,
77        sdk_version: "module_current",
78        libs: [
79            "framework-bluetooth.stubs.module_lib",
80        ],
81    },
82
83    // Only allowed car modules only. Allowed to add tests here.
84    visibility: [
85        "//external/robolectric",
86        "//packages/services/Car/car-lib",
87        "//packages/services/Car/car-lib-module",
88        "//packages/services/Car/libs/car-test-lib",
89        "//packages/services/Car/libs/procfs-inspector/client",
90        "//packages/services/Car/service-builtin",
91        "//packages/services/Car/service",
92        "//packages/services/Car/tests/CarBuiltinLibUnitTest",
93        "//packages/services/Car/tests/CarLibUnitTest:__subpackages__",
94        "//packages/services/Car/tests/CarServiceTest:__subpackages__",
95        "//packages/services/Car/tests/carservice_unit_test",
96        "//packages/services/Car/tests/ProcFsInspector",
97        "//packages/services/Car/libs/car-watchdog-lib",
98        "//cts/tests/tests/car_builtin",
99        "//frameworks/opt/car/services/builtInServices",
100        "//frameworks/opt/car/services/builtInServices/tests",
101        "//frameworks/opt/car/services/updatableServices",
102        "//frameworks/opt/car/services/updatableServices/tests",
103    ],
104
105    permitted_packages: [
106        "android.car.builtin",
107    ],
108
109    droiddoc_options: [
110        "--include-annotations --pass-through-annotation android.annotation.RequiresApi",
111    ],
112
113    compile_dex: true,
114
115    installable: true,
116}
117
118java_library {
119    name: "android.car.builtin.testonly",
120
121    defaults: ["android.car.builtin-defaults"],
122
123    visibility: [
124        "//packages/services/Car/service",
125        "//packages/services/Car/tests/CarLibUnitTest",
126    ],
127}
128