1package { 2 // See: http://go/android-license-faq 3 // A large-scale-change added 'default_applicable_licenses' to import 4 // all of the 'license_kinds' from "system_bt_license" 5 // to get the below license kinds: 6 // SPDX-license-identifier-Apache-2.0 7 default_applicable_licenses: ["system_bt_license"], 8} 9 10filegroup { 11 name: "BluetoothDumpsysSources", 12 srcs: [ 13 "filter.cc", 14 "init_flags.cc", 15 "internal/filter_internal.cc", 16 "reflection_schema.cc", 17 ], 18} 19 20filegroup { 21 name: "BluetoothDumpsysTestSources", 22 srcs: [ 23 "filter_test.cc", 24 "internal/filter_internal_test.cc", 25 "reflection_schema_test.cc", 26 ], 27} 28 29genrule { 30 name: "BluetoothGeneratedDumpsysTestData_h", 31 visibility: ["//visibility:public"], 32 tools: [ 33 "flatc", 34 ], 35 cmd: "$(location flatc) -I packages/modules/Bluetooth/system/gd -b --schema -o $(genDir) --cpp $(in) ", 36 srcs: [ 37 "test_data/root.fbs", 38 "test_data/bar.fbs", 39 "test_data/baz.fbs", 40 "test_data/foo.fbs", 41 "test_data/qux.fbs", 42 ], 43 out: [ 44 "root_generated.h", 45 "bar_generated.h", 46 "baz_generated.h", 47 "foo_generated.h", 48 "qux_generated.h", 49 ], 50} 51 52genrule { 53 name: "BluetoothGeneratedDumpsysTestData_bfbs", 54 visibility: ["//visibility:private"], 55 tools: [ 56 "flatc", 57 ], 58 cmd: "$(location flatc) -I packages/modules/Bluetooth/system/gd -b --schema -o $(genDir) --cpp $(in) ", 59 srcs: [ 60 "test_data/root.fbs", 61 "test_data/bar.fbs", 62 "test_data/baz.fbs", 63 "test_data/foo.fbs", 64 "test_data/qux.fbs", 65 ], 66 out: [ 67 "root.bfbs", 68 "bar.bfbs", 69 "baz.bfbs", 70 "foo.bfbs", 71 "qux.bfbs", 72 ], 73} 74 75genrule { 76 name: "BluetoothGeneratedDumpsysTestSchema_cc", 77 visibility: ["//visibility:private"], 78 tools: [ 79 "bluetooth_flatbuffer_bundler", 80 ], 81 cmd: "$(location bluetooth_flatbuffer_bundler) -w -m bluetooth.DumpsysData -f dumpsys_module_schema_data -n testing -g $(genDir) $(locations :BluetoothGeneratedDumpsysBinarySchema_bfbs)", 82 srcs: [ 83 ":BluetoothGeneratedDumpsysBinarySchema_bfbs", 84 ], 85 out: [ 86 "dumpsys_module_schema_data.cc", 87 ], 88} 89 90genrule { 91 name: "BluetoothGeneratedDumpsysBundledSchema_cc", 92 visibility: ["//visibility:private"], 93 tools: [ 94 "bluetooth_flatbuffer_bundler", 95 ], 96 cmd: "$(location bluetooth_flatbuffer_bundler) -w -m bluetooth.DumpsysData -f generated_dumpsys_bundled_schema -n bluetooth::dumpsys -g $(genDir) $(locations :BluetoothGeneratedDumpsysBinarySchema_bfbs)", 97 srcs: [ 98 ":BluetoothGeneratedDumpsysBinarySchema_bfbs", 99 ], 100 out: [ 101 "generated_dumpsys_bundled_schema.cc", 102 ], 103} 104 105genrule { 106 name: "BluetoothGeneratedDumpsysBundledTestSchema_cc", 107 visibility: ["//visibility:private"], 108 tools: [ 109 "bluetooth_flatbuffer_bundler", 110 ], 111 cmd: "$(location bluetooth_flatbuffer_bundler) -w -m testing.DumpsysTestDataRoot -f generated_dumpsys_bundled_test_schema -n testing -g $(genDir) $(locations :BluetoothGeneratedDumpsysTestData_bfbs)", 112 srcs: [ 113 ":BluetoothGeneratedDumpsysTestData_bfbs", 114 ], 115 out: [ 116 "generated_dumpsys_bundled_test_schema.cc", 117 ], 118} 119 120genrule { 121 name: "BluetoothFlatbufferTestData_h", 122 tools: [ 123 "flatc", 124 ], 125 cmd: "$(location flatc) -I packages/modules/Bluetooth/system/gd -b --schema -o $(genDir) --cpp $(in) ", 126 srcs: [ 127 "bluetooth_flatbuffer_test.fbs", 128 ], 129 out: [ 130 "bluetooth_flatbuffer_test_generated.h", "bluetooth_flatbuffer_test.bfbs", 131 ], 132} 133 134cc_library { 135 name: "libbluetooth-dumpsys", 136 host_supported: true, 137 defaults: [ 138 "gd_defaults", 139 "gd_clang_file_coverage", 140 "gd_clang_tidy", 141 ], 142 generated_sources: [ 143 "BluetoothGeneratedDumpsysBundledSchema_cc", 144 ], 145 apex_available: [ 146 "com.android.bluetooth", 147 ], 148 min_sdk_version: "30", 149} 150 151cc_library { 152 name: "libbluetooth-dumpsys-test", 153 host_supported: true, 154 defaults: [ 155 "gd_defaults", 156 "gd_clang_file_coverage", 157 "gd_clang_tidy", 158 ], 159 generated_sources: [ 160 "BluetoothGeneratedDumpsysBundledTestSchema_cc", 161 ], 162} 163 164cc_library { 165 name: "libbluetooth-dumpsys-unittest", 166 host_supported: true, 167 defaults: [ 168 "gd_defaults", 169 "gd_clang_file_coverage", 170 "gd_clang_tidy", 171 ], 172 generated_headers: [ 173 "BluetoothGeneratedDumpsysTestSchema_cc", 174 ], 175} 176 177cc_test { 178 name: "bluetooth_flatbuffer_tests", 179 test_suites: ["device-tests"], 180 defaults: ["fluoride_common_options", "mts_defaults"], 181 host_supported: true, 182 test_options: { 183 unit_test: true, 184 }, 185 static_libs: [ 186 "libgmock", 187 "libflatbuffers-cpp", 188 ], 189 srcs: [ 190 "bluetooth_flatbuffer_test.cc", 191 ], 192 generated_headers: [ 193 "BluetoothFlatbufferTestData_h", 194 ], 195} 196