| # Copyright 2019 The Bazel Authors. All rights reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| """WORKSPACE prerequisites for Stardoc.""" |
| |
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") |
| |
| def stardoc_repositories(): |
| """Adds the external repositories for rules used by Stardoc.""" |
| maybe( |
| http_archive, |
| name = "bazel_skylib", |
| sha256 = "9f38886a40548c6e96c106b752f242130ee11aaa068a56ba7e56f4511f33e4f2", |
| urls = [ |
| "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.6.1/bazel-skylib-1.6.1.tar.gz", |
| "https://github.com/bazelbuild/bazel-skylib/releases/download/1.6.1/bazel-skylib-1.6.1.tar.gz", |
| ], |
| ) |
| |
| maybe( |
| http_archive, |
| name = "com_google_protobuf", |
| sha256 = "75be42bd736f4df6d702a0e4e4d30de9ee40eac024c4b845d17ae4cc831fe4ae", |
| strip_prefix = "protobuf-21.7", |
| urls = [ |
| "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v21.7.tar.gz", |
| "https://github.com/protocolbuffers/protobuf/archive/v21.7.tar.gz", |
| ], |
| ) |
| |
| maybe( |
| http_archive, |
| name = "rules_java", |
| urls = [ |
| "https://mirror.bazel.build/github.com/bazelbuild/rules_java/releases/download/7.6.1/rules_java-7.6.1.tar.gz", |
| "https://github.com/bazelbuild/rules_java/releases/download/7.6.1/rules_java-7.6.1.tar.gz", |
| ], |
| sha256 = "f8ae9ed3887df02f40de9f4f7ac3873e6dd7a471f9cddf63952538b94b59aeb3", |
| ) |
| |
| RULES_JVM_EXTERNAL_TAG = "6.1" |
| RULES_JVM_EXTERNAL_SHA = "08ea921df02ffe9924123b0686dc04fd0ff875710bfadb7ad42badb931b0fd50" |
| maybe( |
| http_archive, |
| name = "rules_jvm_external", |
| strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG, |
| sha256 = RULES_JVM_EXTERNAL_SHA, |
| url = "https://github.com/bazelbuild/rules_jvm_external/releases/download/%s/rules_jvm_external-%s.tar.gz" % (RULES_JVM_EXTERNAL_TAG, RULES_JVM_EXTERNAL_TAG), |
| ) |
| |
| maybe( |
| http_archive, |
| name = "rules_license", |
| urls = [ |
| "https://mirror.bazel.build/github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz", |
| "https://github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz", |
| ], |
| sha256 = "4531deccb913639c30e5c7512a054d5d875698daeb75d8cf90f284375fe7c360", |
| ) |
| |
| maybe( |
| http_archive, |
| name = "toolchains_protoc", |
| sha256 = "3898f8e621ca5b3c7b94300c5ae19075d5bb28349d6e6f407490a466ba1e2544", |
| strip_prefix = "toolchains_protoc-0.3.1", |
| url = "https://github.com/aspect-build/toolchains_protoc/releases/download/v0.3.1/toolchains_protoc-v0.3.1.tar.gz", |
| ) |
| |
| # Transitive dep of com_google_protobuf. Unfortunately, protobuf_deps() |
| # pulls in a dep that's too old. |
| maybe( |
| http_archive, |
| name = "rules_proto", |
| sha256 = "6fb6767d1bef535310547e03247f7518b03487740c11b6c6adb7952033fe1295", |
| strip_prefix = "rules_proto-6.0.2", |
| url = "https://github.com/bazelbuild/rules_proto/releases/download/6.0.2/rules_proto-6.0.2.tar.gz", |
| ) |
| |
| # Transitive dep of com_google_protobuf. Unfortunately, protobuf_deps() |
| # pulls in a dep that's too old. |
| maybe( |
| http_archive, |
| name = "rules_python", |
| sha256 = "a644da969b6824cc87f8fe7b18101a8a6c57da5db39caa6566ec6109f37d2141", |
| strip_prefix = "rules_python-0.20.0", |
| url = "https://github.com/bazelbuild/rules_python/releases/download/0.20.0/rules_python-0.20.0.tar.gz", |
| ) |