|
| 1 | +# Copyright 2021-2025 Buf Technologies, Inc. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +"Bazel dependencies" |
| 16 | + |
| 17 | +bazel_dep(name = "rules_buf", version = "0.0.0", dev_dependency = True) |
| 18 | +bazel_dep(name = "gazelle", version = "0.36.0", dev_dependency = True) |
| 19 | +bazel_dep(name = "protobuf", version = "29.1", repo_name = "com_google_protobuf") |
| 20 | +bazel_dep(name = "rules_proto", version = "7.0.2") |
| 21 | +bazel_dep(name = "rules_go", version = "0.54.1") |
| 22 | + |
| 23 | +local_path_override( |
| 24 | + module_name = "rules_buf", |
| 25 | + path = "../..", |
| 26 | +) |
| 27 | + |
| 28 | +go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") |
| 29 | + |
| 30 | +go_sdk.from_file(go_mod = "//:go.mod") |
| 31 | + |
| 32 | +go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") |
| 33 | +go_deps.from_file(go_mod = "//:go.mod") |
| 34 | + |
| 35 | + |
| 36 | +use_repo( |
| 37 | + go_deps, |
| 38 | + "org_golang_google_protobuf", |
| 39 | + "com_connectrpc_connect", |
| 40 | + "org_golang_x_net" |
| 41 | +) |
| 42 | + |
| 43 | +buf = use_extension("@rules_buf//buf:extensions.bzl", "buf") |
| 44 | + |
| 45 | +# Override the default version of buf |
| 46 | +buf.toolchains(version = "v1.47.2", sha256 = "1b37b75dc0a777a0cba17fa2604bc9906e55bb4c578823d8b7a8fe3fc9fe4439") |
| 47 | + |
| 48 | +# Allow people to use `bazel run @rules_buf_toolchains//:buf -- --version` |
| 49 | +use_repo(buf, "rules_buf_toolchains") |
0 commit comments