blob: cb772efe9e1bd6f5deb055d0388edc9ec95bd598 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
2load("@io_bazel_rules_go//proto:compiler.bzl", "go_proto_compiler")
3
4package(default_visibility = ["//visibility:private"])
5
6go_library(
7 name = "go_default_library",
8 srcs = ["main.go"],
9 importpath = "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway",
10 deps = [
11 "//codegenerator:go_default_library",
12 "//protoc-gen-grpc-gateway/descriptor:go_default_library",
13 "//protoc-gen-grpc-gateway/gengateway:go_default_library",
14 "@com_github_golang_glog//:go_default_library",
15 "@com_github_golang_protobuf//proto:go_default_library",
16 "@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto",
17 ],
18)
19
20go_binary(
21 name = "protoc-gen-grpc-gateway",
22 embed = [":go_default_library"],
23 visibility = ["//visibility:public"],
24)
25
26go_proto_compiler(
27 name = "go_gen_grpc_gateway",
28 options = [
29 "logtostderr=true",
30 "allow_repeated_fields_in_body=true",
31 ],
32 plugin = ":protoc-gen-grpc-gateway",
33 suffix = ".pb.gw.go",
34 visibility = ["//visibility:public"],
35 deps = [
36 "//runtime:go_default_library",
37 "//utilities:go_default_library",
38 "@com_github_golang_protobuf//proto:go_default_library",
39 "@org_golang_google_grpc//:go_default_library",
40 "@org_golang_google_grpc//codes:go_default_library",
41 "@org_golang_google_grpc//grpclog:go_default_library",
42 "@org_golang_google_grpc//status:go_default_library",
43 "@org_golang_x_net//context:go_default_library",
44 ],
45)