forked from rules-proto-grpc/rules_proto_grpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
93 lines (88 loc) · 2.9 KB
/
BUILD.bazel
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
load("//:defs.bzl", "proto_plugin")
proto_plugin(
name = "docbook_plugin",
out = "{name}.xml",
options = [
"docbook",
"{name}.xml",
],
quirks = [
"QUIRK_OUT_PASS_ROOT",
"QUIRK_DIRECT_MODE",
],
tool = select({
"@bazel_tools//src/conditions:darwin_x86_64": "@protoc_gen_doc_darwin_x86_64//:protoc-gen-doc",
"@bazel_tools//src/conditions:linux_x86_64": "@protoc_gen_doc_linux_x86_64//:protoc-gen-doc",
"@bazel_tools//src/conditions:windows": "@protoc_gen_doc_windows_x86_64//:protoc-gen-doc.exe",
}),
visibility = ["//visibility:public"],
)
proto_plugin(
name = "html_plugin",
out = "{name}.html",
options = [
"html",
"{name}.html",
],
quirks = [
"QUIRK_OUT_PASS_ROOT",
"QUIRK_DIRECT_MODE",
],
tool = select({
"@bazel_tools//src/conditions:darwin_x86_64": "@protoc_gen_doc_darwin_x86_64//:protoc-gen-doc",
"@bazel_tools//src/conditions:linux_x86_64": "@protoc_gen_doc_linux_x86_64//:protoc-gen-doc",
"@bazel_tools//src/conditions:windows": "@protoc_gen_doc_windows_x86_64//:protoc-gen-doc.exe",
}),
visibility = ["//visibility:public"],
)
proto_plugin(
name = "json_plugin",
out = "{name}.json",
options = [
"json",
"{name}.json",
],
quirks = [
"QUIRK_OUT_PASS_ROOT",
"QUIRK_DIRECT_MODE",
],
tool = select({
"@bazel_tools//src/conditions:darwin_x86_64": "@protoc_gen_doc_darwin_x86_64//:protoc-gen-doc",
"@bazel_tools//src/conditions:linux_x86_64": "@protoc_gen_doc_linux_x86_64//:protoc-gen-doc",
"@bazel_tools//src/conditions:windows": "@protoc_gen_doc_windows_x86_64//:protoc-gen-doc.exe",
}),
visibility = ["//visibility:public"],
)
proto_plugin(
name = "markdown_plugin",
out = "{name}.md",
options = [
"markdown",
"{name}.md",
],
quirks = [
"QUIRK_OUT_PASS_ROOT",
"QUIRK_DIRECT_MODE",
],
tool = select({
"@bazel_tools//src/conditions:darwin_x86_64": "@protoc_gen_doc_darwin_x86_64//:protoc-gen-doc",
"@bazel_tools//src/conditions:linux_x86_64": "@protoc_gen_doc_linux_x86_64//:protoc-gen-doc",
"@bazel_tools//src/conditions:windows": "@protoc_gen_doc_windows_x86_64//:protoc-gen-doc.exe",
}),
visibility = ["//visibility:public"],
)
proto_plugin(
name = "template_plugin",
out = "{name}",
quirks = [
"QUIRK_OUT_PASS_ROOT",
"QUIRK_DIRECT_MODE",
],
separate_options_flag = True,
tool = select({
"@bazel_tools//src/conditions:darwin_x86_64": "@protoc_gen_doc_darwin_x86_64//:protoc-gen-doc",
"@bazel_tools//src/conditions:linux_x86_64": "@protoc_gen_doc_linux_x86_64//:protoc-gen-doc",
"@bazel_tools//src/conditions:windows": "@protoc_gen_doc_windows_x86_64//:protoc-gen-doc.exe",
}),
visibility = ["//visibility:public"],
)