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"""Dependency registration helpers for repositories which need to load bazel-skylib's gazelle plugin.""" 16 17load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") 18load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 19load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") 20 21def bazel_skylib_gazelle_plugin_workspace(): 22 """Loads dependencies required to use skylib's gazelle plugin""" 23 bazel_skylib_workspace() 24 25 maybe( 26 http_archive, 27 name = "rules_license", 28 sha256 = "4531deccb913639c30e5c7512a054d5d875698daeb75d8cf90f284375fe7c360", 29 urls = [ 30 "https://mirror.bazel.build/github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz", 31 "https://github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz", 32 ], 33 ) 34 35 maybe( 36 http_archive, 37 name = "io_bazel_rules_go", 38 sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3", 39 urls = [ 40 "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", 41 "https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", 42 ], 43 ) 44 45 maybe( 46 http_archive, 47 name = "bazel_gazelle", 48 sha256 = "ecba0f04f96b4960a5b250c8e8eeec42281035970aa8852dda73098274d14a1d", 49 urls = [ 50 "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz", 51 "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz", 52 ], 53 ) 54