summaryrefslogtreecommitdiff
path: root/system/device/Android.bp
blob: e6acea27b341b54780456ebe3c55e6b8bec519d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// Bluetooth device static library for target
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "system_bt_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["system_bt_license"],
}

cc_library_static {
    name: "libbtdevice",
    defaults: ["fluoride_defaults"],
    host_supported: true,
    local_include_dirs: [
        "include",
    ],
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/gd",
        "packages/modules/Bluetooth/system/internal_include",
        "packages/modules/Bluetooth/system/stack/include",
    ],
    srcs: [
        "src/controller.cc",
        "src/device_iot_config.cc",
        "src/device_iot_config_int.cc",
        "src/esco_parameters.cc",
        "src/interop.cc",
    ],
    apex_available: [
        "com.android.btservices",
    ],
    min_sdk_version: "Tiramisu",
    header_libs: ["libbluetooth_headers"],
}

// Bluetooth device unit tests for target
cc_test {
    name: "net_test_device",
    test_suites: ["device-tests"],
    defaults: [
        "bluetooth_gtest_x86_asan_workaround",
        "fluoride_defaults",
        "mts_defaults",
    ],
    host_supported: true,
    include_dirs: ["packages/modules/Bluetooth/system"],
    srcs: [
        "test/interop_test.cc",
    ],
    shared_libs: [
        "liblog",
    ],
    static_libs: [
        "libbluetooth-types",
        "libbluetooth_gd",
        "libbtcore",
        "libbtdevice",
        "libchrome",
        "libosi",
    ],
    header_libs: ["libbluetooth_headers"],
}

// Bluetooth device unit tests for target
cc_test {
    name: "net_test_device_iot_config",
    test_suites: ["device-tests"],
    defaults: [
        "bluetooth_gtest_x86_asan_workaround",
        "fluoride_defaults",
        "mts_defaults",
    ],
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/device/src",
        "packages/modules/Bluetooth/system/gd",
        "packages/modules/Bluetooth/system/stack/include",
    ],
    srcs: [
        ":TestCommonMockFunctions",
        ":TestMockOsi",
        "test/device_iot_config_test.cc",
    ],
    shared_libs: [
        "libdl",
        "liblog",
    ],
    static_libs: [
        "libbluetooth-types",
        "libbt-platform-protos-lite",
        "libbtcore",
        "libbtdevice",
        "libchrome",
        "libgmock",
    ],
    header_libs: ["libbluetooth_headers"],
}