c-parsons | 2d9566b | 2019-02-20 17:22:55 -0500 | [diff] [blame] | 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 | |
c-parsons | 4ea7b82 | 2018-11-29 18:08:04 -0500 | [diff] [blame] | 17 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 18 | |
| 19 | def _include_if_not_defined(repo_rule, name, **kwargs): |
c-parsons | b40b286 | 2019-06-17 16:16:13 -0400 | [diff] [blame] | 20 | if not native.existing_rule(name): |
c-parsons | 4ea7b82 | 2018-11-29 18:08:04 -0500 | [diff] [blame] | 21 | repo_rule(name = name, **kwargs) |
| 22 | |
c-parsons | c7d5b70 | 2019-09-23 13:27:13 -0400 | [diff] [blame] | 23 | def stardoc_repositories(): |
| 24 | """Adds the external repositories used by the Starlark rules.""" |
c-parsons | 4ea7b82 | 2018-11-29 18:08:04 -0500 | [diff] [blame] | 25 | _include_if_not_defined( |
c-parsons | b8a32e0 | 2019-03-20 15:15:20 -0400 | [diff] [blame] | 26 | http_archive, |
c-parsons | 4ea7b82 | 2018-11-29 18:08:04 -0500 | [diff] [blame] | 27 | name = "bazel_skylib", |
c-parsons | b8a32e0 | 2019-03-20 15:15:20 -0400 | [diff] [blame] | 28 | urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz"], |
| 29 | sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e", |
c-parsons | 4ea7b82 | 2018-11-29 18:08:04 -0500 | [diff] [blame] | 30 | ) |
| 31 | _include_if_not_defined( |
c-parsons | 4c87497 | 2019-08-07 14:29:52 -0400 | [diff] [blame] | 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 | ) |