-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
goprotobuf.BUILD
143 lines (127 loc) · 2.82 KB
/
goprotobuf.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
package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # 3-Clause BSD
load("@io_bazel_rules_go//go:def.bzl", "go_prefix", "go_library", "go_binary")
go_prefix("github.com/golang/protobuf")
go_library(
name = "proto",
srcs = glob(
include = ["proto/*.go"],
exclude = [
"proto/*_test.go",
"proto/pointer_reflect.go",
],
),
)
go_binary(
name = "go_plugin",
srcs = [
"protoc-gen-go/main.go",
"protoc-gen-go/link_grpc.go",
],
deps = [
":proto",
":protoc-gen-go/generator",
":protoc-gen-go/grpc",
],
)
go_library(
name = "protoc-gen-go/grpc",
srcs = ["protoc-gen-go/grpc/grpc.go"],
deps = [
"protoc-gen-go/descriptor",
"protoc-gen-go/generator",
],
)
go_library(
name = "protoc-gen-go/generator",
srcs = ["protoc-gen-go/generator/generator.go"],
deps = [
"protoc-gen-go/descriptor",
"protoc-gen-go/plugin",
"proto",
],
)
go_library(
name = "protoc-gen-go/descriptor",
srcs = ["protoc-gen-go/descriptor/descriptor.pb.go"],
deps = [":proto"]
)
go_library(
name = "protoc-gen-go/plugin",
srcs = ["protoc-gen-go/plugin/plugin.pb.go"],
deps = [
":proto",
":protoc-gen-go/descriptor",
]
)
go_library(
name = "jsonpb",
srcs = glob(
include = ["jsonpb/*.go"],
exclude = ["jsonpb/*_test.go"],
),
deps = [":proto"],
)
go_library(
name = "ptypes",
srcs = glob(
include = ["ptypes/go"],
exclude = ["ptypes/_test.go"],
),
deps = [
":ptypes/any",
":ptypes/duration",
":ptypes/empty",
":ptypes/struct",
":ptypes/timestamp",
":ptypes/wrappers",
],
)
go_library(
name = "ptypes/any",
srcs = glob(
include = ["ptypes/any/*.go"],
exclude = ["ptypes/any/*_test.go"],
),
deps = [":proto"],
)
go_library(
name = "ptypes/duration",
srcs = glob(
include = ["ptypes/duration/*.go"],
exclude = ["ptypes/duration/*_test.go"],
),
deps = [":proto"],
)
go_library(
name = "ptypes/empty",
srcs = glob(
include = ["ptypes/empty/*.go"],
exclude = ["ptypes/empty/*_test.go"],
),
deps = [":proto"],
)
go_library(
name = "ptypes/struct",
srcs = glob(
include = ["ptypes/struct/*.go"],
exclude = ["ptypes/struct/*_test.go"],
),
deps = [":proto"],
)
go_library(
name = "ptypes/timestamp",
srcs = glob(
include = ["ptypes/timestamp/*.go"],
exclude = ["ptypes/timestamp/*_test.go"],
),
deps = [":proto"],
)
go_library(
name = "ptypes/wrappers",
srcs = glob(
include = ["ptypes/wrappers/*.go"],
exclude = ["ptypes/wrappers/*_test.go"],
),
deps = [":proto"],
)