blob: f9cdc8f1b98a555bfd1932bc1099bf5f3a6d9b1f [file] [log] [blame]
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def maybe(repo_rule, name, **kwargs):
"""Defines a repository if it does not already exist.
"""
if name not in native.existing_rules():
repo_rule(name = name, **kwargs)
def kythe_rule_repositories():
"""Defines external repositories for Kythe Bazel rules.
These repositories must be loaded before calling external.bzl%kythe_dependencies.
"""
maybe(
http_archive,
name = "bazel_skylib",
sha256 = "2ea8a5ed2b448baf4a6855d3ce049c4c452a6470b1efd1504fdb7c1c134d220a",
strip_prefix = "bazel-skylib-0.8.0",
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/0.8.0.tar.gz"],
)
maybe(
http_archive,
name = "io_bazel_rules_go",
urls = [
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/v0.20.3/rules_go-v0.20.3.tar.gz",
"https://github.com/bazelbuild/rules_go/releases/download/v0.20.3/rules_go-v0.20.3.tar.gz",
],
sha256 = "e88471aea3a3a4f19ec1310a55ba94772d087e9ce46e41ae38ecebe17935de7b",
)
maybe(
http_archive,
name = "rules_java",
url = "https://github.com/bazelbuild/rules_java/archive/973a93dd2d698929264d1028836f6b9cc60ff817.zip",
sha256 = "a6cb0dbe343b67c7d4f3f11a68e327acdfc71fee1e17affa4e605129fc56bb15",
strip_prefix = "rules_java-973a93dd2d698929264d1028836f6b9cc60ff817",
)
maybe(
http_archive,
name = "rules_proto",
sha256 = "e4fe70af52135d2ee592a07f916e6e1fc7c94cf8786c15e8c0d0f08b1fe5ea16",
strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313",
url = "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.zip",
)
maybe(
http_archive,
name = "bazel_gazelle",
urls = [
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/bazel-gazelle/releases/download/v0.19.1/bazel-gazelle-v0.19.1.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.19.1/bazel-gazelle-v0.19.1.tar.gz",
],
sha256 = "86c6d481b3f7aedc1d60c1c211c6f76da282ae197c3b3160f54bd3a8f847896f",
)
maybe(
http_archive,
name = "build_bazel_rules_nodejs",
sha256 = "a54b2511d6dae42c1f7cdaeb08144ee2808193a088004fc3b464a04583d5aa2e",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.42.3/rules_nodejs-0.42.3.tar.gz"],
)
maybe(
http_archive,
name = "rules_jvm_external",
sha256 = "e5b97a31a3e8feed91636f42e19b11c49487b85e5de2f387c999ea14d77c7f45",
strip_prefix = "rules_jvm_external-2.9",
urls = ["https://github.com/bazelbuild/rules_jvm_external/archive/2.9.zip"],
)