xref: /aosp_15_r20/external/bazel-skylib/gazelle/workspace.bzl (revision bcb5dc7965af6ee42bf2f21341a2ec00233a8c8a)
1*bcb5dc79SHONG Yifan# Copyright 2019 The Bazel Authors. All rights reserved.
2*bcb5dc79SHONG Yifan#
3*bcb5dc79SHONG Yifan# Licensed under the Apache License, Version 2.0 (the "License");
4*bcb5dc79SHONG Yifan# you may not use this file except in compliance with the License.
5*bcb5dc79SHONG Yifan# You may obtain a copy of the License at
6*bcb5dc79SHONG Yifan#
7*bcb5dc79SHONG Yifan#    http://www.apache.org/licenses/LICENSE-2.0
8*bcb5dc79SHONG Yifan#
9*bcb5dc79SHONG Yifan# Unless required by applicable law or agreed to in writing, software
10*bcb5dc79SHONG Yifan# distributed under the License is distributed on an "AS IS" BASIS,
11*bcb5dc79SHONG Yifan# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*bcb5dc79SHONG Yifan# See the License for the specific language governing permissions and
13*bcb5dc79SHONG Yifan# limitations under the License.
14*bcb5dc79SHONG Yifan
15*bcb5dc79SHONG Yifan"""Dependency registration helpers for repositories which need to load bazel-skylib's gazelle plugin."""
16*bcb5dc79SHONG Yifan
17*bcb5dc79SHONG Yifanload("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
18*bcb5dc79SHONG Yifanload("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
19*bcb5dc79SHONG Yifanload("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
20*bcb5dc79SHONG Yifan
21*bcb5dc79SHONG Yifandef bazel_skylib_gazelle_plugin_workspace():
22*bcb5dc79SHONG Yifan    """Loads dependencies required to use skylib's gazelle plugin"""
23*bcb5dc79SHONG Yifan    bazel_skylib_workspace()
24*bcb5dc79SHONG Yifan
25*bcb5dc79SHONG Yifan    maybe(
26*bcb5dc79SHONG Yifan        http_archive,
27*bcb5dc79SHONG Yifan        name = "rules_license",
28*bcb5dc79SHONG Yifan        sha256 = "4531deccb913639c30e5c7512a054d5d875698daeb75d8cf90f284375fe7c360",
29*bcb5dc79SHONG Yifan        urls = [
30*bcb5dc79SHONG Yifan            "https://mirror.bazel.build/github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz",
31*bcb5dc79SHONG Yifan            "https://github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz",
32*bcb5dc79SHONG Yifan        ],
33*bcb5dc79SHONG Yifan    )
34*bcb5dc79SHONG Yifan
35*bcb5dc79SHONG Yifan    maybe(
36*bcb5dc79SHONG Yifan        http_archive,
37*bcb5dc79SHONG Yifan        name = "io_bazel_rules_go",
38*bcb5dc79SHONG Yifan        sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3",
39*bcb5dc79SHONG Yifan        urls = [
40*bcb5dc79SHONG Yifan            "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
41*bcb5dc79SHONG Yifan            "https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
42*bcb5dc79SHONG Yifan        ],
43*bcb5dc79SHONG Yifan    )
44*bcb5dc79SHONG Yifan
45*bcb5dc79SHONG Yifan    maybe(
46*bcb5dc79SHONG Yifan        http_archive,
47*bcb5dc79SHONG Yifan        name = "bazel_gazelle",
48*bcb5dc79SHONG Yifan        sha256 = "ecba0f04f96b4960a5b250c8e8eeec42281035970aa8852dda73098274d14a1d",
49*bcb5dc79SHONG Yifan        urls = [
50*bcb5dc79SHONG Yifan            "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
51*bcb5dc79SHONG Yifan            "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
52*bcb5dc79SHONG Yifan        ],
53*bcb5dc79SHONG Yifan    )
54