• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2024 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
15load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
16load("@rules_shell//shell:sh_test.bzl", "sh_test")
17load("//java:repositories.bzl", "JAVA_TOOLS_CONFIG", "REMOTE_JDK_CONFIGS")
18load(":check_remotejdk_configs_match.bzl", "validate_configs")
19
20sh_test(
21    name = "check_remote_jdk_configs_test",
22    srcs = ["check_remote_jdk_configs.sh"],
23    args = [
24        ",".join([
25            config.name,
26            config.urls[0],
27            config.urls[1] if len(config.urls) > 1 else "",
28            config.sha256,
29            config.strip_prefix,
30        ])
31        for configs in REMOTE_JDK_CONFIGS.values()
32        for config in configs
33    ],
34)
35
36sh_test(
37    name = "check_remote_java_tools_configs_test",
38    srcs = ["check_remote_java_tools_configs.sh"],
39    args = [
40        ",".join([
41            name,
42            config["mirror_url"],
43            config["github_url"],
44            config["sha"],
45        ])
46        for name, config in JAVA_TOOLS_CONFIG["artifacts"].items()
47    ],
48)
49
50diff_test(
51    name = "docs_up_to_date_test",
52    failure_message = """
53    Docs are no longer up to date. Regenerate them by running:
54
55    bazel build //java/docs:rules_docs && \
56    cp bazel-bin/java/docs/rules_docs.out java/docs/rules.md
57    """,
58    file1 = "//java/docs:rules.md",
59    file2 = "//java/docs:rules_docs",
60)
61
62validate_configs()
63
64starlark_doc_extract(
65    name = "proxy_bzl_graph",
66    src = "@compatibility_proxy//:proxy.bzl",
67    deps = ["@compatibility_proxy//:proxy_bzl"],
68)
69