-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUILD.bazel
More file actions
61 lines (53 loc) · 2.06 KB
/
BUILD.bazel
File metadata and controls
61 lines (53 loc) · 2.06 KB
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
load("@build_stack_rules_proto//rules:proto_gazelle.bzl", "proto_gazelle")
load("@build_stack_rules_proto//rules/go:proto_go_modules.bzl", "proto_go_modules")
load("@gazelle//:def.bzl", "gazelle_binary")
# -- Gazelle language "walk" ---
# gazelle:exclude vendor
# gazelle:exclude genproto
# -- Gazelle language "resolve" ---
# gazelle:resolve go go github.com/stackb/rules_proto/pkg/protoc @build_stack_rules_proto//pkg/protoc
# -- Gazelle language "go" ---
# gazelle:prefix github.com/stackb/bazel_difftools
# gazelle:go_generate_proto false
# -- Gazelle language "protobuf" ---
# --- the base configuration in rules_proto_config.yaml is tailored for external protos
# --- such as @bazelapis. For the default (source) workspace, switch it from
# --- proto_compile to proto_compiled_sources and disable proto_go_library.
# gazelle:proto_language go +rule proto_compiled_sources
# gazelle:proto_language go -rule proto_compile
# gazelle:proto_language go -rule proto_go_library
gazelle_binary(
name = "gazelle-protobuf",
languages = [
"@gazelle//language/proto:go_default_library",
"@gazelle//language/go:go_default_library",
"@build_stack_rules_proto//language/protobuf",
"@build_stack_rules_proto//language/proto_go_modules",
],
)
proto_gazelle(
name = "gazelle",
cfgs = ["//:rules_proto_config.yaml"],
command = "update",
gazelle = ":gazelle-protobuf",
imports = [
"@bazelapis//:imports.csv",
"@googleapis//:imports.csv",
"@protobufapis//:imports.csv",
"@remoteapis//:imports.csv",
],
)
proto_go_modules(
name = "proto_go_modules",
imports = [
"github.com/bazelbuild/bazelapis/src/main/protobuf/analysis_v2",
# "github.com/bazelbuild/bazelapis/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream/build_event_stream",
],
modules = [
"@protobufapis//:proto_go_modules",
"@bazelapis//:proto_go_modules",
"@remoteapis//:proto_go_modules",
"@googleapis//:proto_go_modules",
],
srcroot = "genproto",
)