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