• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 external dependency resolution functions."""
16
17load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
18
19def _include_if_not_defined(repo_rule, name, **kwargs):
20    if not native.existing_rule(name):
21        repo_rule(name = name, **kwargs)
22
23def stardoc_repositories():
24    """Adds the external repositories used by the Starlark rules."""
25    _include_if_not_defined(
26        http_archive,
27        name = "bazel_skylib",
28        urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz"],
29        sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e",
30    )
31    _include_if_not_defined(
32        http_archive,
33        name = "rules_java",
34        urls = [
35            "https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
36            "https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
37        ],
38        sha256 = "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598",
39        strip_prefix = "rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178",
40    )
41