-
Notifications
You must be signed in to change notification settings - Fork 157
/
BUILD
221 lines (210 loc) · 7.47 KB
/
BUILD
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
package(default_visibility = ["//visibility:public"])
load("//protobuf:rules.bzl", "proto_language", "proto_language_deps")
load("//java:rules.bzl", "java_proto_language_import")
proto_language(
name = "java",
grpc_compile_deps = [
"@io_grpc_grpc_netty//jar",
"@io_grpc_grpc_core//jar",
"@io_grpc_grpc_context//jar",
"@com_google_guava_guava//jar",
"@com_google_errorprone_error_prone_annotations//jar",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_instrumentation_instrumentation_api//jar",
"@io_opencensus_opencensus_api//jar",
"@io_opencensus_opencensus_contrib_grpc_metrics//jar",
"@io_netty_netty_codec_http2//jar",
"@io_netty_netty_codec_http//jar",
"@io_netty_netty_codec//jar",
"@io_netty_netty_transport//jar",
"@io_netty_netty_buffer//jar",
"@io_netty_netty_common//jar",
"@io_netty_netty_resolver//jar",
"@io_netty_netty_handler//jar",
"@io_netty_netty_handler_proxy//jar",
"@io_netty_netty_codec_socks//jar",
"@io_grpc_grpc_protobuf//jar",
"@com_google_protobuf_protobuf_java//jar",
"@com_google_protobuf_protobuf_java_util//jar",
"@com_google_code_gson_gson//jar",
"@com_google_api_grpc_proto_google_common_protos//jar",
"@io_grpc_grpc_protobuf_lite//jar",
"@io_grpc_grpc_stub//jar",
],
grpc_plugin = ":protoc_gen_grpc_java_bin",
grpc_runtime_deps = [
"@io_grpc_grpc_netty//jar",
"@io_grpc_grpc_core//jar",
"@io_grpc_grpc_context//jar",
"@com_google_guava_guava//jar",
"@com_google_errorprone_error_prone_annotations//jar",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_instrumentation_instrumentation_api//jar",
"@io_opencensus_opencensus_api//jar",
"@io_netty_netty_codec_http2//jar",
"@io_netty_netty_codec_http//jar",
"@io_netty_netty_codec//jar",
"@io_netty_netty_transport//jar",
"@io_netty_netty_buffer//jar",
"@io_netty_netty_common//jar",
"@io_netty_netty_resolver//jar",
"@io_netty_netty_handler//jar",
"@io_netty_netty_handler_proxy//jar",
"@io_netty_netty_codec_socks//jar",
"@io_grpc_grpc_protobuf//jar",
"@com_google_protobuf_protobuf_java//jar",
"@com_google_protobuf_protobuf_java_util//jar",
"@com_google_code_gson_gson//jar",
"@com_google_api_grpc_proto_google_common_protos//jar",
"@io_grpc_grpc_protobuf_lite//jar",
"@io_grpc_grpc_stub//jar",
],
output_to_jar = True,
pb_compile_deps = [
"@com_google_guava_guava//jar",
"@com_google_protobuf_protobuf_java//jar",
],
pb_file_extensions = [],
pb_runtime_deps = [],
supports_grpc = True,
)
java_proto_language_import(
name = "grpc_compiletime_deps",
langs = [":java"],
)
java_proto_language_import(
name = "netty_runtime_deps",
langs = [":java"],
runtime_deps = True,
)
proto_language(
name = "nano",
grpc_compile_deps = [
"@io_grpc_grpc_core//jar",
"@io_grpc_grpc_protobuf//jar",
"@io_grpc_grpc_stub//jar",
"@com_google_protobuf_nano_protobuf_javanano//jar",
"@io_grpc_grpc_protobuf_nano//jar",
],
grpc_plugin = ":protoc_gen_grpc_java_bin",
grpc_runtime_deps = [
"@io_grpc_grpc_netty//jar",
"@io_grpc_grpc_protobuf_lite//jar",
"@io_netty_netty_buffer//jar",
"@io_netty_netty_codec//jar",
"@io_netty_netty_codec_http2//jar",
"@io_netty_netty_common//jar",
"@io_netty_netty_handler//jar",
"@io_netty_netty_resolver//jar",
"@io_netty_netty_transport//jar",
],
output_to_jar = True,
pb_compile_deps = [
"@com_google_guava_guava//jar",
"@com_google_protobuf_protobuf_java//jar",
"@com_google_protobuf_nano_protobuf_javanano//jar",
],
pb_file_extensions = [],
pb_options = [
"ignore_services=true",
],
pb_plugin_name = "javanano",
pb_runtime_deps = [],
supports_grpc = True,
)
genrule(
name = "protoc_gen_grpc_java_bin",
srcs = select({
":darwin": ["@protoc_gen_grpc_java_macosx//file"],
":windows": ["@protoc_gen_grpc_java_windows_x86_64//file"],
":windows_msvc": ["@protoc_gen_grpc_java_windows_x86_64//file"],
"//conditions:default": ["@protoc_gen_grpc_java_linux_x86_64//file"],
}),
outs = ["protoc_gen_grpc_java"],
cmd = " && ".join([
"IN=$$(pwd)/$(SRCS)",
"OUT=$$(pwd)/$@",
"TMP=$$(mktemp -d $${TMPDIR:-/tmp}/genrule.XXXXXXXXXX)",
"cd $$TMP",
"cp $$IN $$OUT",
"rm -rf $$TMP",
]),
executable = True,
)
config_setting(
name = "darwin",
values = {"host_cpu": "darwin"},
visibility = ["//visibility:private"],
)
config_setting(
name = "windows",
values = {"host_cpu": "x64_windows"},
visibility = ["//visibility:private"],
)
config_setting(
name = "windows_msvc",
values = {"host_cpu": "x64_windows_msvc"},
visibility = ["//visibility:private"],
)
java_library(
name = "grpc_compile",
visibility = ["//visibility:public"],
exports = [
"@com_google_api_grpc_proto_google_common_protos//jar",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_code_gson_gson//jar",
"@com_google_errorprone_error_prone_annotations//jar",
"@com_google_guava_guava//jar",
"@com_google_instrumentation_instrumentation_api//jar",
"@com_google_protobuf_protobuf_java//jar",
"@com_google_protobuf_protobuf_java_util//jar",
"@io_grpc_grpc_context//jar",
"@io_grpc_grpc_core//jar",
"@io_grpc_grpc_netty//jar",
"@io_grpc_grpc_protobuf//jar",
"@io_grpc_grpc_protobuf_lite//jar",
"@io_grpc_grpc_stub//jar",
"@io_netty_netty_buffer//jar",
"@io_netty_netty_codec//jar",
"@io_netty_netty_codec_http//jar",
"@io_netty_netty_codec_http2//jar",
"@io_netty_netty_codec_socks//jar",
"@io_netty_netty_common//jar",
"@io_netty_netty_handler//jar",
"@io_netty_netty_handler_proxy//jar",
"@io_netty_netty_resolver//jar",
"@io_netty_netty_transport//jar",
"@io_opencensus_opencensus_api//jar",
],
)
java_library(
name = "grpc_runtime",
visibility = ["//visibility:public"],
exports = [
"@com_google_api_grpc_proto_google_common_protos//jar",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_code_gson_gson//jar",
"@com_google_errorprone_error_prone_annotations//jar",
"@com_google_guava_guava//jar",
"@com_google_instrumentation_instrumentation_api//jar",
"@com_google_protobuf_protobuf_java//jar",
"@com_google_protobuf_protobuf_java_util//jar",
"@io_grpc_grpc_context//jar",
"@io_grpc_grpc_core//jar",
"@io_grpc_grpc_netty//jar",
"@io_grpc_grpc_protobuf//jar",
"@io_grpc_grpc_protobuf_lite//jar",
"@io_grpc_grpc_stub//jar",
"@io_netty_netty_buffer//jar",
"@io_netty_netty_codec//jar",
"@io_netty_netty_codec_http//jar",
"@io_netty_netty_codec_http2//jar",
"@io_netty_netty_codec_socks//jar",
"@io_netty_netty_common//jar",
"@io_netty_netty_handler//jar",
"@io_netty_netty_handler_proxy//jar",
"@io_netty_netty_resolver//jar",
"@io_netty_netty_transport//jar",
"@io_opencensus_opencensus_api//jar",
],
)