-
Notifications
You must be signed in to change notification settings - Fork 17
/
MODULE.bazel
42 lines (31 loc) · 1.14 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
# Name and version the module
module(name = "proto-gen-md-diagrams", version = "0.1.0")
# Example from Bazel Build:
# https://github.com/bazelbuild/rules_go/blob/master/MODULE.bazel
# Add Go Rules
bazel_dep(name = "rules_go", version = "0.42.0", repo_name = "io_bazel_rules_go")
# Override the default Go Version
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(
name = "go_override_sdk",
version = "1.21.3",
)
use_repo(go_sdk, "go_override_sdk_toolchains")
register_toolchains("@go_override_sdk_toolchains//:all")
# Register Gazelle
bazel_dep(name = "gazelle", version = "0.33.0")
# Add all other dependencies
bazel_dep(name = "rules_pkg", version = "0.9.1")
bazel_dep(name = "rules_license", version = "0.0.7")
bazel_dep(name = "platforms", version = "0.0.8")
## Load Go Dependencies
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
# Based on the go_deps, create the following exported symbols.
use_repo(
go_deps,
"com_github_davecgh_go_spew",
"com_github_pmezard_go_difflib",
"com_github_stretchr_testify",
"in_gopkg_yaml_v3",
)