Bob Badour | 6f56931 | 2022-02-17 05:10:22 -0800 | [diff] [blame] | 1 | package { |
| 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 | |
Jack He | e9bb55a | 2022-01-10 09:20:33 -0800 | [diff] [blame] | 13 | filegroup { |
| 14 | name: "BlueberryFacadeProto", |
| 15 | srcs: [ |
| 16 | "blueberry/facade/common.proto", |
| 17 | "blueberry/facade/rootservice.proto", |
| 18 | "blueberry/facade/hal/hal_facade.proto", |
| 19 | "blueberry/facade/hci/hci_facade.proto", |
| 20 | "blueberry/facade/hci/acl_manager_facade.proto", |
| 21 | "blueberry/facade/hci/controller_facade.proto", |
| 22 | "blueberry/facade/hci/le_acl_manager_facade.proto", |
| 23 | "blueberry/facade/hci/le_advertising_manager_facade.proto", |
| 24 | "blueberry/facade/hci/le_initiator_address_facade.proto", |
| 25 | "blueberry/facade/hci/le_scanning_manager_facade.proto", |
| 26 | "blueberry/facade/iso/facade.proto", |
| 27 | "blueberry/facade/neighbor/facade.proto", |
| 28 | "blueberry/facade/l2cap/classic/facade.proto", |
| 29 | "blueberry/facade/l2cap/le/facade.proto", |
| 30 | "blueberry/facade/security/facade.proto", |
| 31 | "blueberry/facade/shim/facade.proto", |
| 32 | "blueberry/facade/topshim/facade.proto", |
| 33 | ], |
| 34 | } |
| 35 | |
| 36 | genrule { |
| 37 | name: "BlueberryFacadeGeneratedStub_h", |
| 38 | tools: [ |
| 39 | "aprotoc", |
| 40 | "protoc-gen-grpc-cpp-plugin", |
| 41 | ], |
| 42 | cmd: "$(location aprotoc) -Ipackages/modules/Bluetooth/system -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)", |
| 43 | srcs: [ |
| 44 | ":BlueberryFacadeProto", |
| 45 | ], |
| 46 | out: [ |
| 47 | "blueberry/facade/common.grpc.pb.h", |
| 48 | "blueberry/facade/common.pb.h", |
| 49 | "blueberry/facade/rootservice.grpc.pb.h", |
| 50 | "blueberry/facade/rootservice.pb.h", |
| 51 | "blueberry/facade/hal/hal_facade.grpc.pb.h", |
| 52 | "blueberry/facade/hal/hal_facade.pb.h", |
| 53 | "blueberry/facade/hci/hci_facade.grpc.pb.h", |
| 54 | "blueberry/facade/hci/hci_facade.pb.h", |
| 55 | "blueberry/facade/hci/acl_manager_facade.grpc.pb.h", |
| 56 | "blueberry/facade/hci/acl_manager_facade.pb.h", |
| 57 | "blueberry/facade/hci/controller_facade.grpc.pb.h", |
| 58 | "blueberry/facade/hci/controller_facade.pb.h", |
| 59 | "blueberry/facade/hci/le_acl_manager_facade.grpc.pb.h", |
| 60 | "blueberry/facade/hci/le_acl_manager_facade.pb.h", |
| 61 | "blueberry/facade/hci/le_advertising_manager_facade.grpc.pb.h", |
| 62 | "blueberry/facade/hci/le_advertising_manager_facade.pb.h", |
| 63 | "blueberry/facade/hci/le_initiator_address_facade.grpc.pb.h", |
| 64 | "blueberry/facade/hci/le_initiator_address_facade.pb.h", |
| 65 | "blueberry/facade/hci/le_scanning_manager_facade.grpc.pb.h", |
| 66 | "blueberry/facade/hci/le_scanning_manager_facade.pb.h", |
| 67 | "blueberry/facade/iso/facade.grpc.pb.h", |
| 68 | "blueberry/facade/iso/facade.pb.h", |
| 69 | "blueberry/facade/l2cap/classic/facade.grpc.pb.h", |
| 70 | "blueberry/facade/l2cap/classic/facade.pb.h", |
| 71 | "blueberry/facade/l2cap/le/facade.grpc.pb.h", |
| 72 | "blueberry/facade/l2cap/le/facade.pb.h", |
| 73 | "blueberry/facade/neighbor/facade.grpc.pb.h", |
| 74 | "blueberry/facade/neighbor/facade.pb.h", |
| 75 | "blueberry/facade/security/facade.grpc.pb.h", |
| 76 | "blueberry/facade/security/facade.pb.h", |
| 77 | "blueberry/facade/shim/facade.grpc.pb.h", |
| 78 | "blueberry/facade/shim/facade.pb.h", |
| 79 | ], |
| 80 | } |
| 81 | |
| 82 | genrule { |
| 83 | name: "BlueberryFacadeGeneratedStub_cc", |
| 84 | tools: [ |
| 85 | "aprotoc", |
| 86 | "protoc-gen-grpc-cpp-plugin", |
| 87 | ], |
| 88 | cmd: "$(location aprotoc) -Ipackages/modules/Bluetooth/system -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)", |
| 89 | srcs: [ |
| 90 | ":BlueberryFacadeProto", |
| 91 | ], |
| 92 | out: [ |
| 93 | "blueberry/facade/common.grpc.pb.cc", |
| 94 | "blueberry/facade/common.pb.cc", |
| 95 | "blueberry/facade/rootservice.grpc.pb.cc", |
| 96 | "blueberry/facade/rootservice.pb.cc", |
| 97 | "blueberry/facade/hal/hal_facade.grpc.pb.cc", |
| 98 | "blueberry/facade/hal/hal_facade.pb.cc", |
| 99 | "blueberry/facade/hci/hci_facade.grpc.pb.cc", |
| 100 | "blueberry/facade/hci/hci_facade.pb.cc", |
| 101 | "blueberry/facade/hci/acl_manager_facade.grpc.pb.cc", |
| 102 | "blueberry/facade/hci/acl_manager_facade.pb.cc", |
| 103 | "blueberry/facade/hci/controller_facade.grpc.pb.cc", |
| 104 | "blueberry/facade/hci/controller_facade.pb.cc", |
| 105 | "blueberry/facade/hci/le_acl_manager_facade.grpc.pb.cc", |
| 106 | "blueberry/facade/hci/le_acl_manager_facade.pb.cc", |
| 107 | "blueberry/facade/hci/le_advertising_manager_facade.grpc.pb.cc", |
| 108 | "blueberry/facade/hci/le_advertising_manager_facade.pb.cc", |
| 109 | "blueberry/facade/hci/le_initiator_address_facade.grpc.pb.cc", |
| 110 | "blueberry/facade/hci/le_initiator_address_facade.pb.cc", |
| 111 | "blueberry/facade/hci/le_scanning_manager_facade.grpc.pb.cc", |
| 112 | "blueberry/facade/hci/le_scanning_manager_facade.pb.cc", |
| 113 | "blueberry/facade/iso/facade.grpc.pb.cc", |
| 114 | "blueberry/facade/iso/facade.pb.cc", |
| 115 | "blueberry/facade/l2cap/classic/facade.grpc.pb.cc", |
| 116 | "blueberry/facade/l2cap/classic/facade.pb.cc", |
| 117 | "blueberry/facade/l2cap/le/facade.grpc.pb.cc", |
| 118 | "blueberry/facade/l2cap/le/facade.pb.cc", |
| 119 | "blueberry/facade/neighbor/facade.grpc.pb.cc", |
| 120 | "blueberry/facade/neighbor/facade.pb.cc", |
| 121 | "blueberry/facade/security/facade.grpc.pb.cc", |
| 122 | "blueberry/facade/security/facade.pb.cc", |
| 123 | "blueberry/facade/shim/facade.grpc.pb.cc", |
| 124 | "blueberry/facade/shim/facade.pb.cc", |
| 125 | ], |
| 126 | } |
| 127 | |
| 128 | genrule { |
| 129 | name: "BlueberryFacadeAndCertGeneratedStub_py", |
| 130 | tools: [ |
| 131 | "aprotoc", |
| 132 | "protoc-gen-grpc-python-plugin", |
| 133 | "soong_zip", |
| 134 | ], |
| 135 | cmd: "mkdir -p $(genDir)/files && " + |
| 136 | "$(location aprotoc) -Ipackages/modules/Bluetooth/system -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-python-plugin) $(in) --grpc_out=$(genDir)/files --python_out=$(genDir)/files && " + |
| 137 | "find $(genDir)/files -type d -exec touch {}/__init__.py \\; &&" + |
| 138 | "$(location soong_zip) -C $(genDir)/files -D $(genDir)/files -o $(out)", |
| 139 | srcs: [ |
| 140 | ":BlueberryFacadeProto", |
| 141 | ], |
| 142 | out: ["blueberry_facade_generated_py.zip"], |
| 143 | } |
| 144 | |
| 145 | rust_protobuf { |
| 146 | name: "libbt_facade_proto", |
| 147 | crate_name: "bt_facade_proto", |
| 148 | protos: ["blueberry/facade/common.proto"], |
| 149 | grpc_protos: [ |
| 150 | "blueberry/facade/hci/controller_facade.proto", |
| 151 | "blueberry/facade/hci/hci_facade.proto", |
| 152 | "blueberry/facade/hal/hal_facade.proto", |
| 153 | "blueberry/facade/rootservice.proto", |
| 154 | ], |
| 155 | source_stem: "facade", |
| 156 | host_supported: true, |
| 157 | apex_available: [ |
Jack He | e9bb55a | 2022-01-10 09:20:33 -0800 | [diff] [blame] | 158 | "com.android.bluetooth", |
| 159 | ], |
| 160 | min_sdk_version: "30", |
| 161 | } |
| 162 | |
| 163 | rust_protobuf { |
| 164 | name: "libbt_topshim_facade_protobuf", |
| 165 | crate_name: "bt_topshim_facade_protobuf", |
| 166 | source_stem: "topshim_facade", |
| 167 | host_supported: true, |
| 168 | grpc_protos: ["blueberry/facade/topshim/facade.proto"], |
| 169 | } |
| 170 | |
| 171 | genrule { |
| 172 | name: "libbt_topshim_facade_py_proto", |
| 173 | tools: [ |
| 174 | "aprotoc", |
| 175 | "protoc-gen-grpc-python-plugin", |
| 176 | "soong_zip", |
| 177 | ], |
Martin Brabham | 7994f3f | 2022-02-17 21:21:12 +0000 | [diff] [blame] | 178 | cmd: "$(location aprotoc) --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-python-plugin) -Iexternal/protobuf/src -Ipackages/modules/Bluetooth/system $(in) --grpc_out=$(genDir) --python_out=$(genDir)", |
Jack He | e9bb55a | 2022-01-10 09:20:33 -0800 | [diff] [blame] | 179 | srcs: ["blueberry/facade/topshim/facade.proto"], |
| 180 | out: [ |
| 181 | "blueberry/facade/topshim/facade_pb2.py", |
| 182 | "blueberry/facade/topshim/facade_pb2_grpc.py" |
| 183 | ], |
Bob Badour | 6f56931 | 2022-02-17 05:10:22 -0800 | [diff] [blame] | 184 | } |