xref: /aosp_15_r20/external/bazelbuild-rules_go/extras/embed_data_deps.bzl (revision 9bb1b549b6a84214c53be0924760be030e66b93a)
1# Copyright 2019 The Bazel Authors. All rights reserved.
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"""Repository dependencies for embed_data.bzl"""
16
17load(
18    "@bazel_tools//tools/build_defs/repo:git.bzl",
19    "git_repository",
20)
21
22def go_embed_data_dependencies():
23    print("Embedding is now better handled by using rules_go's built-in embedding functionality (https://github.com/bazelbuild/rules_go/blob/master/docs/go/core/rules.md#go_library-embedsrcs). The `go_embed_data_dependencies` macro is deprecated and will be removed in rules_go version 0.39.")
24
25    if "com_github_kevinburke_go_bindata" not in native.existing_rules():
26        git_repository(
27            name = "com_github_kevinburke_go_bindata",
28            remote = "https://github.com/kevinburke/go-bindata",
29            # v3.13.0+incompatible, "latest" as of 2019-07-08
30            commit = "53d73b98acf3bd9f56d7f9136ed8e1be64756e1d",
31            patches = [Label("//third_party:com_github_kevinburke_go_bindata-gazelle.patch")],
32            patch_args = ["-p1"],
33            shallow_since = "1545009224 +0000",
34            # gazelle args: -go_prefix github.com/kevinburke/go-bindata
35        )
36