| # Copyright 2025 Google LLC |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| """Bazel Module definition for rsclient""" |
| |
| register_toolchains("//prebuilt/clang:clang_toolchain") |
| |
| ## Bazel rule libraries |
| |
| bazel_dep(name = "rules_go", version = "0.51.0", repo_name = "io_bazel_rules_go") |
| single_version_override( |
| module_name = "rules_go", |
| patch_strip = 0, |
| patches = [], |
| ) |
| |
| bazel_dep(name = "rules_pkg", version = "1.0.1") |
| |
| bazel_dep(name = "bazel_skylib", version = "1.6.1", dev_dependency = True) |
| |
| ## C++ Dependencies |
| |
| bazel_dep(name = "glog", version = "0.7.1", repo_name = "com_github_google_glog") |
| bazel_dep(name = "gflags", version = "2.2.2", repo_name = "com_github_gflags_gflags") |
| |
| ## Go Dependencies |
| go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk") |
| go_sdk.download( |
| name = "go_sdk", |
| version = "1.23.1", # remember to update go.mod as well |
| ) |
| use_repo(go_sdk, "go_sdk") |
| go_sdk.nogo(nogo = "//tools:nogo") |
| |
| bazel_dep(name = "gazelle", version = "0.40.0") |
| |
| go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") |
| go_deps.from_file(go_mod = "//:go.mod") |
| |
| ### Googleapis pinned version |
| go_deps.module( |
| path = "github.com/googleapis/googleapis", |
| sum = "unused", |
| version = "0.0.0", |
| ) |
| go_deps.gazelle_override( |
| build_file_generation = "clean", |
| directives = [ |
| "gazelle:proto file", |
| ], |
| path = "github.com/googleapis/googleapis", |
| ) |
| go_deps.archive_override( |
| path = "github.com/googleapis/googleapis", |
| sha256 = "7e3ac698b19a8969a91c3e88a04bfa4128342ef7be3d48d2d3baa491d8626d4d", |
| strip_prefix = "googleapis-bad8d92019660beca95396e71901d783fb8e1273", |
| urls = ["https://github.com/googleapis/googleapis/archive/bad8d92019660beca95396e71901d783fb8e1273.zip"], |
| ) |
| |
| googleapis_resolve = [ |
| "gazelle:resolve proto proto google/rpc/status.proto @com_github_googleapis_googleapis//google/rpc:status_proto", |
| "gazelle:resolve proto go google/rpc/status.proto @org_golang_google_genproto_googleapis_rpc//status", |
| "gazelle:resolve proto proto google/longrunning/operations.proto @com_github_googleapis_googleapis//google/longrunning:operations_proto", |
| "gazelle:resolve proto go google/longrunning/operations.proto @com_google_cloud_go_longrunning//autogen/longrunningpb", |
| "gazelle:resolve proto proto google/api/annotations.proto @com_github_googleapis_googleapis//google/api:annotations_proto", |
| "gazelle:resolve proto go google/api/annotations.proto @org_golang_google_genproto_googleapis_api//annotations", |
| "gazelle:resolve proto proto google/devtools/resultstore/v2/resultstore_upload.proto @com_github_googleapis_googleapis//google/devtools/resultstore/v2:resultstore_proto", |
| "gazelle:resolve proto go google/devtools/resultstore/v2/resultstore_upload.proto @org_golang_google_genproto_googleapis_devtools_resultstore_v2//resultstore_upload", |
| ] |
| |
| go_deps.gazelle_override( |
| build_file_generation = "clean", |
| directives = googleapis_resolve, |
| path = "github.com/bazelbuild/remote-apis-sdks", |
| ) |
| go_deps.gazelle_override( |
| build_file_generation = "clean", |
| directives = googleapis_resolve, |
| path = "github.com/bazelbuild/remote-apis", |
| ) |
| |
| ### All *direct* Go dependencies of the module have to be listed explicitly. |
| use_repo( |
| go_deps, |
| "com_github_bazelbuild_remote_apis", |
| "com_github_bazelbuild_remote_apis_sdks", |
| "com_github_golang_glog", |
| "com_github_google_go_cmp", |
| "com_github_google_uuid", |
| "com_github_googleapis_googleapis", |
| "org_golang_google_api", |
| "org_golang_google_genproto", |
| "org_golang_google_genproto_googleapis_bytestream", |
| "org_golang_google_grpc", |
| "org_golang_google_protobuf", |
| "org_golang_x_mod", |
| "org_golang_x_oauth2", |
| "org_golang_x_sync", |
| "org_golang_x_tools", |
| ) |