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 // SPDX-license-identifier-BSD 8 // SPDX-license-identifier-MIT 9 // legacy_unencumbered 10 default_applicable_licenses: ["system_bt_license"], 11} 12 13filegroup { 14 name: "BlueberryFacadeProto", 15 srcs: [ 16 "blueberry/facade/common.proto", 17 "blueberry/facade/hal/hal_facade.proto", 18 "blueberry/facade/hci/acl_manager_facade.proto", 19 "blueberry/facade/hci/controller_facade.proto", 20 "blueberry/facade/hci/hci_facade.proto", 21 "blueberry/facade/hci/le_acl_manager_facade.proto", 22 "blueberry/facade/hci/le_advertising_manager_facade.proto", 23 "blueberry/facade/hci/le_initiator_address_facade.proto", 24 "blueberry/facade/hci/le_scanning_manager_facade.proto", 25 "blueberry/facade/l2cap/classic/facade.proto", 26 "blueberry/facade/l2cap/le/facade.proto", 27 "blueberry/facade/neighbor/facade.proto", 28 "blueberry/facade/rootservice.proto", 29 "blueberry/facade/security/facade.proto", 30 "blueberry/facade/topshim/facade.proto", 31 ], 32} 33 34filegroup { 35 name: "TestMockCodecManager", 36 srcs: [ 37 "bta/le_audio/mock_codec_manager.cc", 38 ], 39} 40 41genrule { 42 name: "BlueberryFacadeGeneratedStub_h", 43 tools: [ 44 "aprotoc", 45 "protoc-gen-grpc-cpp-plugin", 46 ], 47 cmd: "$(location aprotoc) -Ipackages/modules/Bluetooth/system -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(locations :BlueberryFacadeProto) --grpc_out=$(genDir) --cpp_out=$(genDir)", 48 srcs: [ 49 ":BlueberryFacadeProto", 50 ":libprotobuf-internal-protos", 51 ], 52 out: [ 53 "blueberry/facade/common.grpc.pb.h", 54 "blueberry/facade/common.pb.h", 55 "blueberry/facade/hal/hal_facade.grpc.pb.h", 56 "blueberry/facade/hal/hal_facade.pb.h", 57 "blueberry/facade/hci/acl_manager_facade.grpc.pb.h", 58 "blueberry/facade/hci/acl_manager_facade.pb.h", 59 "blueberry/facade/hci/controller_facade.grpc.pb.h", 60 "blueberry/facade/hci/controller_facade.pb.h", 61 "blueberry/facade/hci/hci_facade.grpc.pb.h", 62 "blueberry/facade/hci/hci_facade.pb.h", 63 "blueberry/facade/hci/le_acl_manager_facade.grpc.pb.h", 64 "blueberry/facade/hci/le_acl_manager_facade.pb.h", 65 "blueberry/facade/hci/le_advertising_manager_facade.grpc.pb.h", 66 "blueberry/facade/hci/le_advertising_manager_facade.pb.h", 67 "blueberry/facade/hci/le_initiator_address_facade.grpc.pb.h", 68 "blueberry/facade/hci/le_initiator_address_facade.pb.h", 69 "blueberry/facade/hci/le_scanning_manager_facade.grpc.pb.h", 70 "blueberry/facade/hci/le_scanning_manager_facade.pb.h", 71 "blueberry/facade/l2cap/classic/facade.grpc.pb.h", 72 "blueberry/facade/l2cap/classic/facade.pb.h", 73 "blueberry/facade/l2cap/le/facade.grpc.pb.h", 74 "blueberry/facade/l2cap/le/facade.pb.h", 75 "blueberry/facade/neighbor/facade.grpc.pb.h", 76 "blueberry/facade/neighbor/facade.pb.h", 77 "blueberry/facade/rootservice.grpc.pb.h", 78 "blueberry/facade/rootservice.pb.h", 79 "blueberry/facade/security/facade.grpc.pb.h", 80 "blueberry/facade/security/facade.pb.h", 81 ], 82} 83 84genrule { 85 name: "BlueberryFacadeGeneratedStub_cc", 86 tools: [ 87 "aprotoc", 88 "protoc-gen-grpc-cpp-plugin", 89 ], 90 cmd: "$(location aprotoc) -Ipackages/modules/Bluetooth/system -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(locations :BlueberryFacadeProto) --grpc_out=$(genDir) --cpp_out=$(genDir)", 91 srcs: [ 92 ":BlueberryFacadeProto", 93 ":libprotobuf-internal-protos", 94 ], 95 out: [ 96 "blueberry/facade/common.grpc.pb.cc", 97 "blueberry/facade/common.pb.cc", 98 "blueberry/facade/hal/hal_facade.grpc.pb.cc", 99 "blueberry/facade/hal/hal_facade.pb.cc", 100 "blueberry/facade/hci/acl_manager_facade.grpc.pb.cc", 101 "blueberry/facade/hci/acl_manager_facade.pb.cc", 102 "blueberry/facade/hci/controller_facade.grpc.pb.cc", 103 "blueberry/facade/hci/controller_facade.pb.cc", 104 "blueberry/facade/hci/hci_facade.grpc.pb.cc", 105 "blueberry/facade/hci/hci_facade.pb.cc", 106 "blueberry/facade/hci/le_acl_manager_facade.grpc.pb.cc", 107 "blueberry/facade/hci/le_acl_manager_facade.pb.cc", 108 "blueberry/facade/hci/le_advertising_manager_facade.grpc.pb.cc", 109 "blueberry/facade/hci/le_advertising_manager_facade.pb.cc", 110 "blueberry/facade/hci/le_initiator_address_facade.grpc.pb.cc", 111 "blueberry/facade/hci/le_initiator_address_facade.pb.cc", 112 "blueberry/facade/hci/le_scanning_manager_facade.grpc.pb.cc", 113 "blueberry/facade/hci/le_scanning_manager_facade.pb.cc", 114 "blueberry/facade/l2cap/classic/facade.grpc.pb.cc", 115 "blueberry/facade/l2cap/classic/facade.pb.cc", 116 "blueberry/facade/l2cap/le/facade.grpc.pb.cc", 117 "blueberry/facade/l2cap/le/facade.pb.cc", 118 "blueberry/facade/neighbor/facade.grpc.pb.cc", 119 "blueberry/facade/neighbor/facade.pb.cc", 120 "blueberry/facade/rootservice.grpc.pb.cc", 121 "blueberry/facade/rootservice.pb.cc", 122 "blueberry/facade/security/facade.grpc.pb.cc", 123 "blueberry/facade/security/facade.pb.cc", 124 ], 125} 126 127genrule { 128 name: "BlueberryFacadeAndCertGeneratedStub_py", 129 tools: [ 130 "aprotoc", 131 "protoc-gen-grpc-python-plugin", 132 "soong_zip", 133 ], 134 cmd: "mkdir -p $(genDir)/files && " + 135 "$(location aprotoc) -Ipackages/modules/Bluetooth/system -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-python-plugin) $(locations :BlueberryFacadeProto) --grpc_out=$(genDir)/files --python_out=$(genDir)/files && " + 136 "find $(genDir)/files -type d -exec touch {}/__init__.py \\; &&" + 137 "$(location soong_zip) -C $(genDir)/files -D $(genDir)/files -o $(out)", 138 srcs: [ 139 ":BlueberryFacadeProto", 140 ":libprotobuf-internal-protos", 141 ], 142 out: ["blueberry_facade_generated_py.zip"], 143} 144 145rust_protobuf { 146 name: "libbt_topshim_facade_protobuf", 147 crate_name: "bt_topshim_facade_protobuf", 148 source_stem: "topshim_facade", 149 host_supported: true, 150 grpc_protos: ["blueberry/facade/topshim/facade.proto"], 151} 152 153// Export system headers for rules that can't simply use `include_dirs` 154cc_library_headers { 155 name: "libbluetooth_system_headers", 156 visibility: [ 157 "//packages/modules/Bluetooth/system:__subpackages__", 158 ], 159 export_include_dirs: ["./"], 160 vendor_available: true, 161 host_supported: true, 162 apex_available: [ 163 "//apex_available:platform", 164 "com.android.btservices", 165 ], 166 min_sdk_version: "30", 167} 168