blob: 5c8c119c32bfb18160651a2b76b4261304f2348d [file] [log] [blame]
c-parsons2d9566b2019-02-20 17:22:55 -05001# 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
c-parsons4ea7b822018-11-29 18:08:04 -050017load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
18
19def _include_if_not_defined(repo_rule, name, **kwargs):
c-parsonsb40b2862019-06-17 16:16:13 -040020 if not native.existing_rule(name):
c-parsons4ea7b822018-11-29 18:08:04 -050021 repo_rule(name = name, **kwargs)
22
c-parsonsc7d5b702019-09-23 13:27:13 -040023def stardoc_repositories():
24 """Adds the external repositories used by the Starlark rules."""
c-parsons4ea7b822018-11-29 18:08:04 -050025 _include_if_not_defined(
c-parsonsb8a32e02019-03-20 15:15:20 -040026 http_archive,
c-parsons4ea7b822018-11-29 18:08:04 -050027 name = "bazel_skylib",
c-parsonsb8a32e02019-03-20 15:15:20 -040028 urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz"],
29 sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e",
c-parsons4ea7b822018-11-29 18:08:04 -050030 )
31 _include_if_not_defined(
c-parsons4c874972019-08-07 14:29:52 -040032 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 )