-
Notifications
You must be signed in to change notification settings - Fork 150
/
rules_proto_config.yaml
314 lines (284 loc) · 8.03 KB
/
rules_proto_config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
plugins:
# CLOSURE
- name: closure_js
implementation: builtin:js:closure
- name: protoc-gen-grpc-js
implementation: stackb:grpc.js:protoc-gen-grpc-js
# CPP
- name: cpp
implementation: builtin:cpp
- name: protoc-gen-grpc-cpp
implementation: grpc:grpc:cpp
# GO
- name: protoc-gen-go
implementation: golang:protobuf:protoc-gen-go
- name: protoc-gen-go-grpc
implementation: grpc:grpc-go:protoc-gen-go-grpc
deps:
- "@org_golang_google_grpc//:go_default_library"
- "@org_golang_google_grpc//codes"
- "@org_golang_google_grpc//status"
# GRPC-WEB
- name: protoc-gen-grpc-web
implementation: grpc:grpc-web:protoc-gen-grpc-web
options:
- mode=grpcwebtext
- import_style=commonjs+dts
# JAVA
- name: java
implementation: builtin:java
- name: protoc-gen-grpc-java
implementation: grpc:grpc-java:protoc-gen-grpc-java
# COMMONJS
- name: node_js
implementation: builtin:js:common
- name: protoc-gen-grpc-node
implementation: grpc:grpc-node:protoc-gen-grpc-node
options:
- grpc_js
# PYTHON
- name: python
implementation: builtin:python
- name: pyi
implementation: builtin:pyi
- name: protoc-gen-grpc-python
implementation: grpc:grpc:protoc-gen-grpc-python
# SCALA
- name: protoc-gen-scala
implementation: scalapb:scalapb:protoc-gen-scala
- name: protoc-gen-scala-grpc
implementation: scalapb:scalapb:protoc-gen-scala
label: "@build_stack_rules_proto//plugin/scalapb/scalapb:protoc-gen-scala-grpc"
options:
- grpc
- name: protoc-gen-akka-grpc
implementation: akka:akka-grpc:protoc-gen-akka-grpc
# TS
- name: ts_proto
implementation: stephenh:ts-proto:protoc-gen-ts-proto
options:
- "emitImportedFiles=false"
- "esModuleInterop=true"
rules:
# CORE
- name: proto_compile
implementation: stackb:rules_proto:proto_compile
visibility:
- //visibility:public
- name: proto_descriptor_set
implementation: stackb:rules_proto:proto_descriptor_set
visibility:
- //visibility:public
# CLOSURE
- name: proto_closure_js_library
implementation: stackb:rules_proto:proto_closure_js_library
visibility:
- //visibility:public
- name: grpc_closure_js_library
implementation: stackb:rules_proto:grpc_closure_js_library
visibility:
- //visibility:public
# CPP
- name: proto_cc_library
implementation: stackb:rules_proto:proto_cc_library
deps:
- "@com_google_protobuf//:protobuf"
visibility:
- //visibility:public
- name: grpc_cc_library
implementation: stackb:rules_proto:grpc_cc_library
deps:
- "@com_github_grpc_grpc//:grpc++"
- "@com_github_grpc_grpc//:grpc++_reflection"
visibility:
- //visibility:public
# GO
- name: proto_go_library
implementation: stackb:rules_proto:proto_go_library
deps:
- "@org_golang_google_protobuf//reflect/protoreflect"
- "@org_golang_google_protobuf//runtime/protoimpl"
resolves:
- "google/protobuf/([a-z]+).proto @org_golang_google_protobuf//types/known/${1}pb"
- "google/protobuf/(descriptor|plugin).proto @org_golang_google_protobuf//types/${1}pb"
visibility:
- //visibility:public
# GRPC-WEB
- name: grpc_web_js_library
implementation: stackb:rules_proto:grpc_web_js_library
deps:
- "@org_golang_google_protobuf//reflect/protoreflect"
- "@org_golang_google_protobuf//runtime/protoimpl"
visibility:
- //visibility:public
# JAVA
- name: proto_java_library
implementation: stackb:rules_proto:proto_java_library
deps:
- "@com_google_protobuf//:protobuf_java"
visibility:
- //visibility:public
- name: grpc_java_library
implementation: stackb:rules_proto:grpc_java_library
deps:
- "@io_grpc_grpc_java//stub"
- "@io_grpc_grpc_java//stub:javax_annotation"
- "@io_grpc_grpc_java//context"
- "@io_grpc_grpc_java//protobuf"
- "@com_google_guava_guava//jar"
visibility:
- //visibility:public
# COMMONJS
- name: proto_nodejs_library
implementation: stackb:rules_proto:proto_nodejs_library
visibility:
- //visibility:public
- name: grpc_nodejs_library
implementation: stackb:rules_proto:grpc_nodejs_library
visibility:
- //visibility:public
# PYTHON
- name: proto_py_library
implementation: stackb:rules_proto:proto_py_library
deps:
- "@com_google_protobuf//:protobuf_python"
visibility:
- //visibility:public
- name: grpc_py_library
implementation: stackb:rules_proto:grpc_py_library
# TODO: add grpc_py_library deps
visibility:
- //visibility:public
# SCALA
- name: proto_scala_library
implementation: stackb:rules_proto:proto_scala_library
options:
- --plugins=protoc-gen-scala
deps:
- "@maven_scala//:com_google_protobuf_protobuf_java"
- "@maven_scala//:com_thesamet_scalapb_lenses_2_12"
- "@maven_scala//:com_thesamet_scalapb_scalapb_runtime_2_12"
visibility:
- //visibility:public
- name: grpc_scala_library
implementation: stackb:rules_proto:grpc_scala_library
options:
- --plugins=protoc-gen-scala-grpc,protoc-gen-akka-grpc
deps:
- "@maven_scala//:com_google_protobuf_protobuf_java"
- "@maven_scala//:com_thesamet_scalapb_lenses_2_12"
- "@maven_scala//:com_thesamet_scalapb_scalapb_runtime_2_12"
- "@maven_scala//:com_thesamet_scalapb_scalapb_runtime_grpc_2_12"
- "@maven_akka//:com_lightbend_akka_grpc_akka_grpc_runtime_2_12_2_1_3"
- "@maven_akka//:com_typesafe_akka_akka_actor_2_12"
- "@maven_akka//:com_typesafe_akka_akka_http_core_2_12"
- "@maven_akka//:com_typesafe_akka_akka_stream_2_12"
- "@maven_scala//:io_grpc_grpc_api"
- "@maven_scala//:io_grpc_grpc_protobuf"
- "@maven_scala//:io_grpc_grpc_stub"
visibility:
- //visibility:public
# TS
- name: proto_ts_library
implementation: stackb:rules_proto:proto_ts_library
attrs:
- out_dir ts # Set an out_dir so that we don't conflict with the closurejs output
visibility:
- //visibility:public
deps:
- "@//:node_modules/@nestjs/microservices"
- "@//:node_modules/@types/node"
- "@//:node_modules/long"
- "@//:node_modules/protobufjs"
- "@//:node_modules/rxjs"
languages:
# CLOSURE
- name: closure_js
plugins:
- closure_js
- protoc-gen-grpc-js
rules:
- proto_compile
- proto_closure_js_library
- grpc_closure_js_library
enabled: false
# CPP
- name: cpp
plugins:
- cpp
- protoc-gen-grpc-cpp
rules:
- proto_compile
- proto_cc_library
- grpc_cc_library
enabled: false
# DESCRIPTOR
- name: descriptor
# proto_descriptor_set rule does not require any plugins, but this framework
# does, so pick one arbitrarily
plugins:
- protoc-gen-go
rules:
- proto_descriptor_set
enabled: false
# GO
- name: go
plugins:
- protoc-gen-go
- protoc-gen-go-grpc
rules:
- proto_compile
- proto_go_library
enabled: false
# JAVA
- name: java
plugins:
- java
- protoc-gen-grpc-java
rules:
- proto_compile
- proto_java_library
- grpc_java_library
enabled: false
# NODE_JS
- name: node_js
plugins:
- node_js
- protoc-gen-grpc-node
- protoc-gen-grpc-web
rules:
- proto_compile
- proto_nodejs_library
- grpc_nodejs_library
- grpc_web_js_library
enabled: false
# PYTHON
- name: python
plugins:
- python
- pyi
- protoc-gen-grpc-python
rules:
- proto_compile
- proto_py_library
- grpc_py_library
enabled: false
# SCALA
- name: scala
plugins:
- protoc-gen-scala
- protoc-gen-scala-grpc
- protoc-gen-akka-grpc
rules:
- proto_compile
- proto_scala_library
- grpc_scala_library
enabled: false
# TS
- name: ts_proto
plugins:
- ts_proto
rules:
- proto_compile
- proto_ts_library
enabled: false