1// Bluetooth device static library for target
2package {
3    // See: http://go/android-license-faq
4    // A large-scale-change added 'default_applicable_licenses' to import
5    // all of the 'license_kinds' from "system_bt_license"
6    // to get the below license kinds:
7    //   SPDX-license-identifier-Apache-2.0
8    default_applicable_licenses: ["system_bt_license"],
9}
10
11cc_library_static {
12    name: "libbtdevice",
13    defaults: ["fluoride_defaults"],
14    host_supported: true,
15    local_include_dirs: [
16        "include",
17    ],
18    include_dirs: [
19        "packages/modules/Bluetooth/system",
20        "packages/modules/Bluetooth/system/gd",
21        "packages/modules/Bluetooth/system/stack/include",
22    ],
23    srcs: [
24        "src/device_iot_config.cc",
25        "src/device_iot_config_int.cc",
26        "src/esco_parameters.cc",
27        "src/interop.cc",
28    ],
29    apex_available: [
30        "com.android.btservices",
31    ],
32    min_sdk_version: "Tiramisu",
33    header_libs: ["libbluetooth_headers"],
34    static_libs: [
35        "bluetooth_flags_c_lib",
36        "libaconfig_storage_read_api_cc",
37        "libbluetooth_hci_pdl",
38        "libbluetooth_log",
39        "libflatbuffers-cpp",
40        "server_configurable_flags",
41    ],
42}
43
44// Bluetooth device unit tests for target
45cc_test {
46    name: "net_test_device",
47    test_suites: ["general-tests"],
48    defaults: [
49        "fluoride_defaults",
50        "mts_defaults",
51    ],
52    host_supported: true,
53    include_dirs: ["packages/modules/Bluetooth/system"],
54    srcs: [
55        "test/interop_test.cc",
56    ],
57    shared_libs: [
58        "libbase",
59        "liblog",
60    ],
61    static_libs: [
62        "libbluetooth-types",
63        "libbluetooth_gd",
64        "libbluetooth_log",
65        "libbtcore",
66        "libbtdevice",
67        "libchrome",
68        "libcom.android.sysprop.bluetooth.wrapped",
69        "libosi",
70    ],
71    header_libs: ["libbluetooth_headers"],
72}
73
74// Bluetooth device unit tests for target
75cc_test {
76    name: "net_test_device_iot_config",
77    test_suites: ["general-tests"],
78    defaults: [
79        "fluoride_defaults",
80        "mts_defaults",
81    ],
82    include_dirs: [
83        "packages/modules/Bluetooth/system",
84        "packages/modules/Bluetooth/system/device/src",
85        "packages/modules/Bluetooth/system/gd",
86        "packages/modules/Bluetooth/system/stack/include",
87    ],
88    srcs: [
89        ":TestCommonMockFunctions",
90        ":TestMockOsi",
91        "test/device_iot_config_test.cc",
92    ],
93    shared_libs: [
94        "libaconfig_storage_read_api_cc",
95        "libbase",
96        "libdl",
97        "liblog",
98    ],
99    static_libs: [
100        "bluetooth_flags_c_lib",
101        "libbluetooth-types",
102        "libbluetooth_log",
103        "libbt-platform-protos-lite",
104        "libbtcore",
105        "libbtdevice",
106        "libchrome",
107        "libflagtest",
108        "libgmock",
109        "libosi",
110        "server_configurable_flags",
111    ],
112    header_libs: ["libbluetooth_headers"],
113}
114