-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMODULE.bazel
51 lines (43 loc) · 1.58 KB
/
MODULE.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
"""
This module contains a client/server solution implementing the classic Greet service using the following technologies:
* Bazel
* Buf
* ConnectRPC
* Go
* Grpc Health
* Grpc Reflection
* Protocol Buffers
"""
module(
name = "connect-go-googleapis",
version = "1.0.0",
compatibility_level = 1,
)
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
bazel_dep(name = "gazelle", version = "0.36.0", dev_dependency = True, repo_name = "bazel_gazelle")
bazel_dep(name = "protobuf", version = "26.0", dev_dependency = True, repo_name = "com_google_protobuf")
bazel_dep(name = "rules_buf", version = "0.2.0", dev_dependency = True)
bazel_dep(name = "rules_go", version = "0.47.1", dev_dependency = True)
single_version_override(
module_name = "rules_go",
patches = ["import.patch"],
)
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.22.3")
# Register the Go SDK installed on the host.
go_sdk.host()
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
go_deps,
"com_connectrpc_connect",
"com_connectrpc_grpchealth",
"com_connectrpc_grpcreflect",
"org_golang_google_protobuf",
"org_golang_x_net",
)
buf = use_extension("@rules_buf//buf:extensions.bzl", "buf")
# See https://buf.build/docs/build-systems/bazel#buf-dependencies
buf.dependency(module = "buf.build/envoyproxy/protoc-gen-validate:eac44469a7af47e7839a7f1f3d7ac004")
# Allow references to labels under @buf_deps
use_repo(buf, "buf_deps")