forked from bazel-contrib/bazel-gazelle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
145 lines (130 loc) · 3.39 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
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
load("@io_bazel_rules_go//go/tools/bazel_testing:def.bzl", "go_bazel_test")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load(":gazelle_binary_test.bzl", "gazelle_binary_test_suite")
# gazelle:exclude *_test.go
go_bazel_test(
name = "bazel_test",
srcs = [
"go_repository_test.go",
"runner_test.go",
],
rule_files = [
"//:all_files",
"@io_bazel_rules_go//:all_files",
],
deps = ["//testtools"],
)
gazelle_binary_test_suite()
# TODO(jayconrod): test fetch_repo error cases.
exports_files(
[
"gazelle.bash.in",
"extend_docs.bzl",
"repository_docs.bzl",
"list_repository_tools_srcs.go",
"repository_rules_test_errors.patch",
],
visibility = ["//visibility:public"],
)
filegroup(
name = "all_files",
testonly = True,
srcs = [
"BUILD.bazel",
"common.bzl",
"extend_docs.bzl",
"gazelle.bash.in",
"gazelle_binary.bzl",
"gazelle_binary_test.bzl",
"go_repository.bzl",
"go_repository_cache.bzl",
"go_repository_config.bzl",
"go_repository_tools.bzl",
"go_repository_tools_srcs.bzl",
"list_repository_tools_srcs.go",
"overlay_repository.bzl",
"repository_docs.bzl",
"repository_rules_test_errors.patch",
"//internal/bzlmod:all_files",
"//internal/gazellebinarytest:all_files",
"//internal/generationtest:all_files",
"//internal/language:all_files",
"//internal/version:all_files",
"//internal/wspace:all_files",
],
visibility = ["//visibility:public"],
)
bzl_library(
name = "gazelle_binary",
srcs = ["gazelle_binary.bzl"],
visibility = ["//:__subpackages__"],
deps = ["@io_bazel_rules_go//go:def"],
)
bzl_library(
name = "go_repository",
srcs = ["go_repository.bzl"],
visibility = ["//:__subpackages__"],
deps = [
":common",
"//internal:go_repository_cache",
"@bazel_tools//tools/build_defs/repo:utils.bzl",
],
)
bzl_library(
name = "go_repository_cache",
srcs = ["go_repository_cache.bzl"],
visibility = ["//:__subpackages__"],
deps = [":common"],
)
bzl_library(
name = "go_repository_config",
srcs = ["go_repository_config.bzl"],
visibility = ["//:__subpackages__"],
deps = [
":common",
"//internal:go_repository_cache",
],
)
bzl_library(
name = "go_repository_tools",
srcs = ["go_repository_tools.bzl"],
visibility = ["//:__subpackages__"],
deps = [
":common",
"//internal:go_repository_cache",
"//internal:go_repository_tools_srcs",
],
)
bzl_library(
name = "repository_docs",
srcs = ["repository_docs.bzl"],
visibility = ["//:__subpackages__"],
deps = [
":go_repository",
":overlay_repository",
],
)
bzl_library(
name = "extend_docs",
srcs = ["extend_docs.bzl"],
visibility = ["//:__subpackages__"],
deps = [
"gazelle_binary",
"//internal/generationtest",
],
)
bzl_library(
name = "common",
srcs = ["common.bzl"],
visibility = ["//:__subpackages__"],
)
bzl_library(
name = "go_repository_tools_srcs",
srcs = ["go_repository_tools_srcs.bzl"],
visibility = ["//:__subpackages__"],
)
bzl_library(
name = "overlay_repository",
srcs = ["overlay_repository.bzl"],
visibility = ["//:__subpackages__"],
)