# Copyright 2024 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.

load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
load("@rules_shell//shell:sh_test.bzl", "sh_test")
load("//java:repositories.bzl", "JAVA_TOOLS_CONFIG", "REMOTE_JDK_CONFIGS")
load(":check_remotejdk_configs_match.bzl", "validate_configs")

sh_test(
    name = "check_remote_jdk_configs_test",
    srcs = ["check_remote_jdk_configs.sh"],
    args = [
        ",".join([
            config.name,
            config.urls[0],
            config.urls[1] if len(config.urls) > 1 else "",
            config.sha256,
            config.strip_prefix,
        ])
        for configs in REMOTE_JDK_CONFIGS.values()
        for config in configs
    ],
)

sh_test(
    name = "check_remote_java_tools_configs_test",
    srcs = ["check_remote_java_tools_configs.sh"],
    args = [
        ",".join([
            name,
            config["mirror_url"],
            config["github_url"],
            config["sha"],
        ])
        for name, config in JAVA_TOOLS_CONFIG["artifacts"].items()
    ],
)

diff_test(
    name = "docs_up_to_date_test",
    failure_message = """
    Docs are no longer up to date. Regenerate them by running:

    bazel build //java/docs:rules_docs && \
    cp bazel-bin/java/docs/rules_docs.out java/docs/rules.md
    """,
    file1 = "//java/docs:rules.md",
    file2 = "//java/docs:rules_docs",
)

validate_configs()
