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"], } filegroup { name: "BluetoothDumpsysSources", srcs: [ "filter.cc", "init_flags.cc", "internal/filter_internal.cc", "reflection_schema.cc", ], } filegroup { name: "BluetoothDumpsysTestSources", srcs: [ "filter_test.cc", "internal/filter_internal_test.cc", "reflection_schema_test.cc", ], } genrule { name: "BluetoothGeneratedDumpsysTestData_h", visibility: ["//visibility:public"], tools: [ "flatc", ], cmd: "$(location flatc) -I packages/modules/Bluetooth/system/gd -b --schema -o $(genDir) --cpp $(in) ", srcs: [ "test_data/root.fbs", "test_data/bar.fbs", "test_data/baz.fbs", "test_data/foo.fbs", "test_data/qux.fbs", ], out: [ "root_generated.h", "bar_generated.h", "baz_generated.h", "foo_generated.h", "qux_generated.h", ], } genrule { name: "BluetoothGeneratedDumpsysTestData_bfbs", visibility: ["//visibility:private"], tools: [ "flatc", ], cmd: "$(location flatc) -I packages/modules/Bluetooth/system/gd -b --schema -o $(genDir) --cpp $(in) ", srcs: [ "test_data/root.fbs", "test_data/bar.fbs", "test_data/baz.fbs", "test_data/foo.fbs", "test_data/qux.fbs", ], out: [ "root.bfbs", "bar.bfbs", "baz.bfbs", "foo.bfbs", "qux.bfbs", ], } genrule { name: "BluetoothGeneratedDumpsysTestSchema_cc", visibility: ["//visibility:private"], tools: [ "bluetooth_flatbuffer_bundler", ], cmd: "$(location bluetooth_flatbuffer_bundler) -w -m bluetooth.DumpsysData -f dumpsys_module_schema_data -n testing -g $(genDir) $(locations :BluetoothGeneratedDumpsysBinarySchema_bfbs)", srcs: [ ":BluetoothGeneratedDumpsysBinarySchema_bfbs", ], out: [ "dumpsys_module_schema_data.cc", ], } genrule { name: "BluetoothGeneratedDumpsysBundledSchema_cc", visibility: ["//visibility:private"], tools: [ "bluetooth_flatbuffer_bundler", ], cmd: "$(location bluetooth_flatbuffer_bundler) -w -m bluetooth.DumpsysData -f generated_dumpsys_bundled_schema -n bluetooth::dumpsys -g $(genDir) $(locations :BluetoothGeneratedDumpsysBinarySchema_bfbs)", srcs: [ ":BluetoothGeneratedDumpsysBinarySchema_bfbs", ], out: [ "generated_dumpsys_bundled_schema.cc", ], } genrule { name: "BluetoothGeneratedDumpsysBundledTestSchema_cc", visibility: ["//visibility:private"], tools: [ "bluetooth_flatbuffer_bundler", ], cmd: "$(location bluetooth_flatbuffer_bundler) -w -m testing.DumpsysTestDataRoot -f generated_dumpsys_bundled_test_schema -n testing -g $(genDir) $(locations :BluetoothGeneratedDumpsysTestData_bfbs)", srcs: [ ":BluetoothGeneratedDumpsysTestData_bfbs", ], out: [ "generated_dumpsys_bundled_test_schema.cc", ], } genrule { name: "BluetoothFlatbufferTestData_h", tools: [ "flatc", ], cmd: "$(location flatc) -I packages/modules/Bluetooth/system/gd -b --schema -o $(genDir) --cpp $(in) ", srcs: [ "bluetooth_flatbuffer_test.fbs", ], out: [ "bluetooth_flatbuffer_test_generated.h", "bluetooth_flatbuffer_test.bfbs", ], } cc_library { name: "libbluetooth-dumpsys", host_supported: true, defaults: [ "gd_defaults", "gd_clang_file_coverage", "gd_clang_tidy", ], generated_sources: [ "BluetoothGeneratedDumpsysBundledSchema_cc", ], apex_available: [ "com.android.bluetooth", ], min_sdk_version: "30", } cc_library { name: "libbluetooth-dumpsys-test", host_supported: true, defaults: [ "gd_defaults", "gd_clang_file_coverage", "gd_clang_tidy", ], generated_sources: [ "BluetoothGeneratedDumpsysBundledTestSchema_cc", ], } cc_library { name: "libbluetooth-dumpsys-unittest", host_supported: true, defaults: [ "gd_defaults", "gd_clang_file_coverage", "gd_clang_tidy", ], generated_headers: [ "BluetoothGeneratedDumpsysTestSchema_cc", ], } cc_test { name: "bluetooth_flatbuffer_tests", test_suites: ["device-tests"], defaults: ["fluoride_common_options", "mts_defaults"], host_supported: true, test_options: { unit_test: true, }, static_libs: [ "libgmock", "libflatbuffers-cpp", ], srcs: [ "bluetooth_flatbuffer_test.cc", ], generated_headers: [ "BluetoothFlatbufferTestData_h", ], }