• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2022 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"""Sets up prerequisites for rules_android."""
16
17load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
18load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
19
20
21def rules_android_prereqs():
22    """Downloads prerequisite repositories for rules_android."""
23    maybe(
24        http_archive,
25        name = "rules_jvm_external",
26        strip_prefix = "rules_jvm_external-fa73b1a8e4846cee88240d0019b8f80d39feb1c3",
27        sha256 = "7e13e48b50f9505e8a99cc5a16c557cbe826e9b68d733050cd1e318d69f94bb5",
28        url = "https://github.com/bazelbuild/rules_jvm_external/archive/fa73b1a8e4846cee88240d0019b8f80d39feb1c3.zip",
29    )
30
31    maybe(
32        http_archive,
33        name = "com_google_protobuf",
34        sha256 = "87407cd28e7a9c95d9f61a098a53cf031109d451a7763e7dd1253abf8b4df422",
35        strip_prefix = "protobuf-3.19.1",
36        urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.19.1.tar.gz"],
37    )
38
39    maybe(
40        http_archive,
41        name = "remote_java_tools_for_rules_android",
42        sha256 = "8fb4d3138bd92a9d3324dae29c9f70d91ca2db18cd0bf1997446eed4657d19b3",
43        urls = [
44                "https://mirror.bazel.build/bazel_java_tools/releases/java/v11.8/java_tools-v11.8.zip",
45                "https://github.com/bazelbuild/java_tools/releases/download/java_v11.8/java_tools-v11.8.zip",
46        ],
47    )
48
49    maybe(
50        http_archive,
51        name = "bazel_skylib",
52        sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
53        urls = [
54            "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
55            "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
56        ],
57    )
58
59    maybe(
60        http_archive,
61        name = "io_bazel_rules_go",
62        sha256 = "dd926a88a564a9246713a9c00b35315f54cbd46b31a26d5d8fb264c07045f05d",
63        urls = [
64            "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
65            "https://github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
66        ],
67    )
68
69    maybe(
70        http_archive,
71        name = "bazel_gazelle",
72        sha256 = "5982e5463f171da99e3bdaeff8c0f48283a7a5f396ec5282910b9e8a49c0dd7e",
73        urls = [
74            "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz",
75            "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz",
76        ],
77    )
78
79    maybe(
80        http_archive,
81        name = "robolectric",
82        urls = ["https://github.com/robolectric/robolectric-bazel/archive/4.9.2.tar.gz"],
83        strip_prefix = "robolectric-bazel-4.9.2",
84        sha256 = "7e007fcfdca7b7228cb4de72707e8b317026ea95000f963e91d5ae365be52d0d",
85    )
86
87    maybe(
88      http_archive,
89      name = "rules_license",
90      urls = [
91          "https://github.com/bazelbuild/rules_license/releases/download/0.0.4/rules_license-0.0.4.tar.gz",
92          "https://mirror.bazel.build/github.com/bazelbuild/rules_license/releases/download/0.0.4/rules_license-0.0.4.tar.gz",
93      ],
94      sha256 = "6157e1e68378532d0241ecd15d3c45f6e5cfd98fc10846045509fb2a7cc9e381",
95  )
96
97
98