From f5e9af22b6840174511ed108028da67251b4656f Mon Sep 17 00:00:00 2001 From: Simon Stewart Date: Thu, 18 Jan 2024 20:46:19 +0000 Subject: [PATCH] Add rules_jvm_external 6.0 (#1336) * Add rules_jvm_external 6.0 * Update to refreshed snapshot * Follow @fmeum's advice and remove the compatability level change --- modules/rules_jvm_external/6.0/MODULE.bazel | 737 ++++++++++++++++++ .../6.0/patches/module_dot_bazel.patch | 10 + modules/rules_jvm_external/6.0/presubmit.yml | 29 + modules/rules_jvm_external/6.0/source.json | 9 + modules/rules_jvm_external/metadata.json | 3 +- 5 files changed, 787 insertions(+), 1 deletion(-) create mode 100644 modules/rules_jvm_external/6.0/MODULE.bazel create mode 100644 modules/rules_jvm_external/6.0/patches/module_dot_bazel.patch create mode 100644 modules/rules_jvm_external/6.0/presubmit.yml create mode 100644 modules/rules_jvm_external/6.0/source.json diff --git a/modules/rules_jvm_external/6.0/MODULE.bazel b/modules/rules_jvm_external/6.0/MODULE.bazel new file mode 100644 index 00000000000..04f5e830ef9 --- /dev/null +++ b/modules/rules_jvm_external/6.0/MODULE.bazel @@ -0,0 +1,737 @@ +module( + name = "rules_jvm_external", + version = "6.0", +) + +bazel_dep( + name = "bazel_skylib", + version = "1.4.2", +) +bazel_dep( + name = "platforms", + version = "0.0.8", +) +bazel_dep( + name = "rules_java", + version = "7.3.2", +) +bazel_dep( + name = "rules_kotlin", + version = "1.9.0", +) +bazel_dep( + name = "stardoc", + repo_name = "io_bazel_stardoc", + version = "0.5.6", +) + +# Remove this once rules_android has rolled out official Bzlmod support +remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions") + +use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools") + +maven = use_extension(":extensions.bzl", "maven") + +maven.install( + name = "rules_jvm_external_deps", + artifacts = [ + "com.google.auth:google-auth-library-credentials:1.19.0", + "com.google.auth:google-auth-library-oauth2-http:1.19.0", + "com.google.cloud:google-cloud-core:2.22.0", + "com.google.cloud:google-cloud-storage:2.26.1", + "com.google.code.gson:gson:2.10.1", + "com.google.googlejavaformat:google-java-format:1.17.0", + "com.google.guava:guava:32.1.2-jre", + "org.apache.maven:maven-artifact:3.9.4", + "software.amazon.awssdk:s3:2.20.128", + ], + lock_file = "//:rules_jvm_external_deps_install.json", +) + +maven.install( + name = "maven_jar_migrator", + artifacts = [ + "com.google.guava:guava:28.0-jre", + ], +) + +use_repo( + maven, + "maven_jar_migrator", + "rules_jvm_external_deps", + "unpinned_rules_jvm_external_deps", +) + +http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") + +_COURSIER_CLI_VERSION = "v2.1.8" + +COURSIER_CLI_HTTP_FILE_NAME = ("coursier_cli_" + _COURSIER_CLI_VERSION).replace(".", "_").replace("-", "_") + +COURSIER_CLI_GITHUB_ASSET_URL = "https://github.com/coursier/coursier/releases/download/{COURSIER_CLI_VERSION}/coursier.jar".format(COURSIER_CLI_VERSION = _COURSIER_CLI_VERSION) + +# Run 'bazel run //:mirror_coursier' to upload a copy of the jar to the Bazel mirror. +COURSIER_CLI_BAZEL_MIRROR_URL = "https://mirror.bazel.build/coursier_cli/" + COURSIER_CLI_HTTP_FILE_NAME + ".jar" + +COURSIER_CLI_SHA256 = "2b78bfdd3ef13fd1f42f158de0f029d7cbb1f4f652d51773445cf2b6f7918a87" + +http_file( + name = "coursier_cli", + sha256 = COURSIER_CLI_SHA256, + urls = [COURSIER_CLI_GITHUB_ASSET_URL], +) + +http_file( + name = "buildifier-linux-arm64", + sha256 = "917d599dbb040e63ae7a7e1adb710d2057811902fdc9e35cce925ebfd966eeb8", + urls = ["https://github.com/bazelbuild/buildtools/releases/download/5.1.0/buildifier-linux-arm64"], +) + +http_file( + name = "buildifier-linux-x86_64", + sha256 = "52bf6b102cb4f88464e197caac06d69793fa2b05f5ad50a7e7bf6fbd656648a3", + urls = ["https://github.com/bazelbuild/buildtools/releases/download/5.1.0/buildifier-linux-amd64"], +) + +http_file( + name = "buildifier-macos-arm64", + sha256 = "745feb5ea96cb6ff39a76b2821c57591fd70b528325562486d47b5d08900e2e4", + urls = ["https://github.com/bazelbuild/buildtools/releases/download/5.1.0/buildifier-darwin-arm64"], +) + +http_file( + name = "buildifier-macos-x86_64", + sha256 = "c9378d9f4293fc38ec54a08fbc74e7a9d28914dae6891334401e59f38f6e65dc", + urls = ["https://github.com/bazelbuild/buildtools/releases/download/5.1.0/buildifier-darwin-amd64"], +) + +############# Dev dependencies below here + +bazel_dep( + name = "protobuf", + dev_dependency = True, + version = "21.7", +) +bazel_dep( + name = "rules_android", + dev_dependency = True, + version = "0.1.1", +) +bazel_dep( + name = "bzlmod_lock_files", + dev_dependency = True, + version = "0.0.0", +) + +local_path_override( + module_name = "bzlmod_lock_files", + path = "tests/integration/bzlmod_lock_files", +) + +dev_maven = use_extension( + ":extensions.bzl", + "maven", + dev_dependency = True, +) + +dev_maven.install( + artifacts = [ + "com.google.guava:guava:31.1-jre", + "org.hamcrest:hamcrest-core:2.1", + ], + lock_file = "@rules_jvm_external//:maven_install.json", +) + +dev_maven.install( + name = "duplicate_version_warning", + artifacts = [ + "com.fasterxml.jackson.core:jackson-annotations:2.10.1", + "com.fasterxml.jackson.core:jackson-annotations:2.12.1", + "com.fasterxml.jackson.core:jackson-annotations:2.10.1", + "com.fasterxml.jackson.core:jackson-annotations:2.11.2", + "com.github.jnr:jffi:1.3.4", + ], + repositories = [ + "https://repo1.maven.org/maven2", + "https://maven.google.com", + ], +) + +dev_maven.artifact( + name = "duplicate_version_warning", + artifact = "jffi", + classifier = "native", + group = "com.github.jnr", + version = "1.3.3", +) + +dev_maven.artifact( + name = "duplicate_version_warning", + artifact = "jffi", + classifier = "native", + group = "com.github.jnr", + version = "1.3.2", +) + +dev_maven.install( + name = "duplicate_version_warning_same_version", + artifacts = [ + "com.fasterxml.jackson.core:jackson-annotations:2.10.1", + "com.fasterxml.jackson.core:jackson-annotations:2.10.1", + ], + repositories = [ + "https://repo1.maven.org/maven2", + "https://maven.google.com", + ], +) + +dev_maven.artifact( + name = "duplicate_version_warning_same_version", + artifact = "jffi", + classifier = "native", + group = "com.github.jnr", + version = "1.3.3", +) + +dev_maven.artifact( + name = "duplicate_version_warning_same_version", + artifact = "jffi", + classifier = "native", + group = "com.github.jnr", + version = "1.3.3", +) + +dev_maven.artifact( + name = "exclusion_testing", + artifact = "guava", + exclusions = [ + "com.google.j2objc:j2objc-annotations", + "org.codehaus.mojo:animal-sniffer-annotations", + ], + group = "com.google.guava", + version = "27.0-jre", +) + +dev_maven.install( + name = "forcing_versions", + artifacts = [ + # And something that depends on a more recent version of guava + "xyz.rogfam:littleproxy:2.1.0", + ], +) + +# Specify an ancient version of guava, and force its use. If we try to use `[23.3-jre]` as the version, +# the resolution will fail when using `coursier` +dev_maven.artifact( + name = "forcing_versions", + artifact = "guava", + force_version = True, + group = "com.google.guava", + version = "23.3-jre", +) + +dev_maven.install( + name = "global_exclusion_testing", + artifacts = [ + "com.google.guava:guava:27.0-jre", # depends on animal-sniffer-annotations and j2objc-annotations + "com.squareup.okhttp3:okhttp:3.14.1", # depends on animal-sniffer-annotations + "com.diffplug.durian:durian-core:1.2.0", # depends on animal-sniffer-annotations and j2objc-annotations + ], + excluded_artifacts = [ + "com.google.j2objc:j2objc-annotations", + "org.codehaus.mojo:animal-sniffer-annotations", + ], +) + +dev_maven.install( + name = "java_export_exclusion_testing", + artifacts = [ + "com.google.protobuf:protobuf-java:3.23.1", + ], + lock_file = "//tests/custom_maven_install:java_export_exclusion_testing_install.json", +) + +# https://github.com/bazelbuild/rules_jvm_external/issues/351 +dev_maven.install( + name = "json_artifacts_testing", + artifacts = [ + "org.json:json:20190722", + "io.quarkus:quarkus-maven-plugin:1.0.1.Final", + "io.quarkus:quarkus-bom-descriptor-json:1.0.1.Final", + ], + fetch_sources = True, + lock_file = "//tests/custom_maven_install:json_artifacts_testing_install.json", + repositories = [ + "https://repo.maven.apache.org/maven2/", + "https://repo.spring.io/plugins-release/", + ], +) + +dev_maven.install( + name = "jvm_import_test", + artifacts = [ + "com.google.code.findbugs:jsr305:3.0.2", + ], +) + +dev_maven.install( + name = "m2local_testing", + artifacts = [ + # this is a test jar built for integration + # tests in this repo + "com.example:kt:1.0.0", + ], + fail_on_missing_checksum = True, + repositories = [ + "m2Local", + "https://repo1.maven.org/maven2", + ], +) + +dev_maven.install( + name = "m2local_testing_ignore_empty_files", + artifacts = [ + # this is a test jar built for integration + # tests in this repo + "com.example:kt:1.0.0", + ], + fetch_sources = True, + ignore_empty_files = True, + repositories = [ + "m2Local", + "https://repo1.maven.org/maven2", + ], +) + +dev_maven.install( + name = "m2local_testing_ignore_empty_files_repin", + artifacts = [ + # this is a test jar built for integration + # tests in this repo + "com.example:kt:1.0.0", + ], + fetch_sources = True, + ignore_empty_files = True, + lock_file = "//tests/custom_maven_install:m2local_testing_ignore_empty_files_with_pinned_file_install.json", + repositories = [ + "m2Local", + "https://repo1.maven.org/maven2", + ], +) + +dev_maven.install( + name = "m2local_testing_repin", + artifacts = [ + # this is a test jar built for integration + # tests in this repo + "com.example:kt:1.0.0", + ], + lock_file = "//tests/custom_maven_install:m2local_testing_with_pinned_file_install.json", + repositories = [ + "m2Local", + "https://repo1.maven.org/maven2", + ], +) + +dev_maven.install( + name = "m2local_testing_without_checksum", + artifacts = [ + # this is a test jar built for integration + # tests in this repo + "com.example:kt:1.0.0", + ], + # jar won't have checksums for this test case + fail_on_missing_checksum = False, + repositories = [ + "m2Local", + "https://repo1.maven.org/maven2", + ], +) + +dev_maven.install( + name = "manifest_stamp_testing", + artifacts = [ + "com.google.guava:guava:27.0-jre", + "javax.inject:javax.inject:1", + "org.apache.beam:beam-sdks-java-core:2.15.0", + "org.bouncycastle:bcprov-jdk15on:1.64", + ], + lock_file = "//tests/custom_maven_install:manifest_stamp_testing_install.json", +) + +dev_maven.install( + name = "maven_install_in_custom_location", + artifacts = ["com.google.guava:guava:27.0-jre"], + lock_file = "//tests/custom_maven_install:maven_install.json", +) + +dev_maven.install( + # This name matches the one in `tests/integration/bzlmod_lock_files` + name = "multiple_lock_files", + artifacts = ["org.zeromq:jeromq:0.5.4"], + lock_file = "//tests/custom_maven_install:multiple_lock_files_install.json", +) + +dev_maven.install( + name = "override_target_in_deps", + artifacts = [ + "io.opentelemetry:opentelemetry-sdk:1.28.0", + "redis.clients:jedis:5.0.2", + ], + lock_file = "@rules_jvm_external//tests/custom_maven_install:override_target_in_deps_install.json", +) + +dev_maven.override( + name = "override_target_in_deps", + coordinates = "io.opentelemetry:opentelemetry-api", + target = "@//tests/integration/override_targets:additional_deps", +) + +dev_maven.install( + name = "policy_pinned_testing", + artifacts = [ + # https://github.com/bazelbuild/rules_jvm_external/issues/107 + "com.google.cloud:google-cloud-storage:1.66.0", + "com.google.guava:guava:25.0-android", + ], + lock_file = "//tests/custom_maven_install:policy_pinned_testing_install.json", + version_conflict_policy = "pinned", +) + +# These artifacts helped discover limitations by the Maven resolver. Each +# artifact listed here *must have* an accompanying issue. We build_test these +# targets to ensure that they remain supported by the rule. +dev_maven.install( + name = "regression_testing", + artifacts = [ + # https://github.com/bazelbuild/rules_jvm_external/issues/74 + "org.pantsbuild:jarjar:1.6.6", + # https://github.com/bazelbuild/rules_jvm_external/issues/59 + "junit:junit:4.12", + "org.jetbrains.kotlin:kotlin-test:1.3.21", + # https://github.com/bazelbuild/rules_jvm_external/issues/101 + # As referenced in the issue, daml is not available anymore, hence + # replacing with another artifact with a classifier. + "org.eclipse.jetty:jetty-http:jar:tests:9.4.20.v20190813", + # https://github.com/bazelbuild/rules_jvm_external/issues/116 + "org.eclipse.jetty.orbit:javax.servlet:3.0.0.v201112011016", + # https://github.com/bazelbuild/rules_jvm_external/issues/98 + "com.github.fommil.netlib:all:1.1.2", + "nz.ac.waikato.cms.weka:weka-stable:3.8.1", + # https://github.com/bazelbuild/rules_jvm_external/issues/111 + "com.android.support:appcompat-v7:aar:28.0.0", + "com.google.android.gms:play-services-base:16.1.0", + # https://github.com/bazelbuild/rules_jvm_external/issues/119#issuecomment-484278260 + "org.apache.flink:flink-test-utils_2.12:1.8.0", + # https://github.com/bazelbuild/rules_jvm_external/issues/170 + "ch.epfl.scala:compiler-interface:1.3.0-M4+20-c8a2f9bd", + # https://github.com/bazelbuild/rules_jvm_external/issues/172 + "org.openjfx:javafx-base:11.0.1", + # https://github.com/bazelbuild/rules_jvm_external/issues/178 + "io.kubernetes:client-java:4.0.0-beta1", + # https://github.com/bazelbuild/rules_jvm_external/issues/199 + "com.google.ar.sceneform.ux:sceneform-ux:1.10.0", + # https://github.com/bazelbuild/rules_jvm_external/issues/119#issuecomment-504704752 + "com.github.oshi:oshi-parent:3.4.0", + "com.github.spinalhdl:spinalhdl-core_2.11:1.3.6", + "com.github.spinalhdl:spinalhdl-lib_2.11:1.3.6", + # https://github.com/bazelbuild/rules_jvm_external/issues/201 + "org.apache.kafka:kafka_2.11:2.1.1", + "io.confluent:kafka-avro-serializer:5.0.1", + # https://github.com/bazelbuild/rules_jvm_external/issues/309 + "io.quarkus.http:quarkus-http-servlet:3.0.0.Beta1", + # https://github.com/bazelbuild/rules_jvm_external/issues/371 + "com.fasterxml.jackson:jackson-bom:2.9.10", + "org.junit:junit-bom:5.3.1", + # https://github.com/bazelbuild/rules_jvm_external/issues/686 + "io.netty:netty-tcnative-boringssl-static:2.0.51.Final", + # https://github.com/bazelbuild/rules_jvm_external/issues/907 + # Any two platforms to ensure that it doesn't work _only_ under the host operating system + "com.google.protobuf:protoc:exe:linux-x86_64:3.21.12", + "com.google.protobuf:protoc:exe:osx-aarch_64:3.21.12", + # https://github.com/bazelbuild/rules_jvm_external/issues/917 + # androidx core-testing POM has "exclusion" for "byte-buddy" but it should be downloaded as mockito-core + # dependency when the usually omitted "jar" packaging type is specified. + "org.mockito:mockito-core:jar:3.3.3", + "androidx.arch.core:core-testing:aar:2.1.0", + # https://github.com/bazelbuild/rules_jvm_external/issues/1028 + "build.buf:protovalidate:0.1.9", + ], + fail_if_repin_required = True, + generate_compat_repositories = True, + lock_file = "//tests/custom_maven_install:regression_testing_install.json", + repin_instructions = "Please run `REPIN=1 bazel run @regression_testing//:pin` to refresh the lock file.", + repositories = [ + "https://repo1.maven.org/maven2", + "https://maven.google.com", + "https://packages.confluent.io/maven/", + ], +) + +dev_maven.override( + name = "regression_testing", + coordinates = "com.google.ar.sceneform:rendering", + target = "@//tests/integration/override_targets:sceneform_rendering", +) + +# https://github.com/bazelbuild/rules_jvm_external/issues/92#issuecomment-478430167 +dev_maven.artifact( + name = "regression_testing", + artifact = "javapoet", + group = "com.squareup", + neverlink = True, + version = "1.11.1", +) + +# https://github.com/bazelbuild/rules_jvm_external/issues/852 +dev_maven.artifact( + name = "regression_testing", + artifact = "jaxb-ri", + exclusions = [ + "com.sun.xml.bind:jaxb-samples", + "com.sun.xml.bind:jaxb-release-documentation", + ], + group = "com.sun.xml.bind", + version = "2.3.6", +) + +# https://github.com/bazelbuild/rules_jvm_external/issues/865 +dev_maven.artifact( + name = "regression_testing", + artifact = "google-api-services-compute", + classifier = "javadoc", + group = "com.google.apis", + version = "v1-rev235-1.25.0", +) + +dev_maven.install( + name = "starlark_aar_import_test", + # Not actually necessary since this is the default value, but useful for + # testing. + aar_import_bzl_label = "@rules_android//android:rules.bzl", + artifacts = [ + "com.android.support:appcompat-v7:28.0.0", + ], + fetch_sources = False, + repositories = [ + "https://repo1.maven.org/maven2", + "https://maven.google.com", + ], + use_starlark_android_rules = True, +) + +dev_maven.install( + name = "starlark_aar_import_with_sources_test", + # Not actually necessary since this is the default value, but useful for + # testing. + aar_import_bzl_label = "@rules_android//android:rules.bzl", + artifacts = [ + "androidx.work:work-runtime:2.6.0", + ], + fetch_sources = True, + repositories = [ + "https://repo1.maven.org/maven2", + "https://maven.google.com", + ], + use_starlark_android_rules = True, +) + +dev_maven.install( + name = "strict_visibility_testing", + artifacts = [ + # https://github.com/bazelbuild/rules_jvm_external/issues/94 + "org.apache.tomcat:tomcat-catalina:9.0.24", + ], + strict_visibility = True, +) + +# https://github.com/bazelbuild/rules_jvm_external/issues/255 +dev_maven.artifact( + name = "strict_visibility_testing", + artifact = "jetty-http", + classifier = "tests", + group = "org.eclipse.jetty", + version = "9.4.20.v20190813", +) + +dev_maven.install( + name = "strict_visibility_with_compat_testing", + artifacts = [ + # Must not be in any other maven_install where generate_compat_repositories = True + "com.google.http-client:google-http-client-gson:1.42.3", + ], + generate_compat_repositories = True, + strict_visibility = True, +) + +dev_maven.artifact( + name = "testonly_testing", + artifact = "guava", + group = "com.google.guava", + version = "27.0-jre", +) + +dev_maven.artifact( + name = "testonly_testing", + testonly = True, + artifact = "auto-value-annotations", + group = "com.google.auto.value", + version = "1.6.3", +) + +# https://github.com/bazelbuild/rules_jvm_external/issues/433 +dev_maven.install( + name = "version_interval_testing", + artifacts = [ + "io.grpc:grpc-netty-shaded:1.29.0", + ], +) + +dev_maven.install( + name = "v1_lock_file_format", + artifacts = [ + # Coordinates that are in no other `maven_install` + "org.seleniumhq.selenium:selenium-remote-driver:4.8.0", + ], + generate_compat_repositories = True, + lock_file = "//tests/custom_maven_install:v1_lock_file_format_install.json", +) + +# Where there are file locks, the pinned and unpinned repos are listed +# next to each other. Where compat repositories are created, they are +# listed next to the repo that created them. The list is otherwise kept +# in alphabetical order. We use comments to space out the entries and to +# prevent `buildifier` from over-zealously sorting things more than we +# want it to +use_repo( + dev_maven, + "duplicate_version_warning", + "duplicate_version_warning_same_version", + "exclusion_testing", + "forcing_versions", + "global_exclusion_testing", + "m2local_testing", + "m2local_testing_ignore_empty_files", + + # Pinned repo + "m2local_testing_ignore_empty_files_repin", + "unpinned_m2local_testing_ignore_empty_files_repin", + + # Pinned repo + "java_export_exclusion_testing", + "unpinned_java_export_exclusion_testing", + + # Pinned repo + "json_artifacts_testing", + "unpinned_json_artifacts_testing", + + # Unpinned repo + "jvm_import_test", + "manifest_stamp_testing", + "unpinned_manifest_stamp_testing", + + # Pinned repo + "m2local_testing_repin", + "m2local_testing_without_checksum", + "unpinned_m2local_testing_repin", + + # Pinned repo + "maven", + "unpinned_maven", + + # Pinned repo + "maven_install_in_custom_location", + "unpinned_maven_install_in_custom_location", + + # Unpinned repo + "multiple_lock_files", + + # Pinned repo + "override_target_in_deps", + "unpinned_override_target_in_deps", + + # Pinned repo + "policy_pinned_testing", + "unpinned_policy_pinned_testing", + + # Regression testing and libraries exposed as compat repos + "com_android_support_appcompat_v7_aar_28_0_0", + "com_google_guava_guava_27_0_jre", + "nz_ac_waikato_cms_weka_weka_stable", + "org_apache_flink_flink_test_utils_2_12", + "org_eclipse_jetty_jetty_http_tests", + "org_pantsbuild_jarjar", + "regression_testing", + "unpinned_regression_testing", + + # Back to the testing repos + "starlark_aar_import_test", + "starlark_aar_import_with_sources_test", + "strict_visibility_testing", + + # Repo with compat repos + "com_google_http_client_google_http_client_gson", + "strict_visibility_with_compat_testing", + + # Final entries + "com_google_http_client_google_http_client", + "testonly_testing", + "unpinned_v1_lock_file_format", + "v1_lock_file_format", + "version_interval_testing", +) + +http_file( + name = "com.google.ar.sceneform_rendering", + downloaded_file_path = "rendering-1.10.0.aar", + sha256 = "d2f6cd1d54eee0d5557518d1edcf77a3ba37494ae94f9bb862e570ee426a3431", + urls = [ + "https://dl.google.com/android/maven2/com/google/ar/sceneform/rendering/1.10.0/rendering-1.10.0.aar", + ], +) + +http_file( + name = "hamcrest_core_for_test", + downloaded_file_path = "hamcrest-core-1.3.jar", + sha256 = "66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9", + urls = [ + "https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar", + ], +) + +http_file( + name = "hamcrest_core_srcs_for_test", + downloaded_file_path = "hamcrest-core-1.3-sources.jar", + sha256 = "e223d2d8fbafd66057a8848cc94222d63c3cedd652cc48eddc0ab5c39c0f84df", + urls = [ + "https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar", + ], +) + +http_file( + name = "gson_for_test", + downloaded_file_path = "gson-2.9.0.jar", + sha256 = "c96d60551331a196dac54b745aa642cd078ef89b6f267146b705f2c2cbef052d", + urls = [ + "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.9.0/gson-2.9.0.jar", + ], +) + +http_file( + name = "junit_platform_commons_for_test", + downloaded_file_path = "junit-platform-commons-1.8.2.jar", + sha256 = "d2e015fca7130e79af2f4608dc54415e4b10b592d77333decb4b1a274c185050", + urls = [ + "https://repo1.maven.org/maven2/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar", + ], +) + +# https://github.com/bazelbuild/rules_jvm_external/issues/865 +http_file( + name = "google_api_services_compute_javadoc_for_test", + downloaded_file_path = "google-api-services-compute-v1-rev235-1.25.0-javadoc.jar", + sha256 = "b03be5ee8effba3bfbaae53891a9c01d70e2e3bd82ad8889d78e641b22bd76c2", + urls = [ + "https://repo1.maven.org/maven2/com/google/apis/google-api-services-compute/v1-rev235-1.25.0/google-api-services-compute-v1-rev235-1.25.0-javadoc.jar", + ], +) diff --git a/modules/rules_jvm_external/6.0/patches/module_dot_bazel.patch b/modules/rules_jvm_external/6.0/patches/module_dot_bazel.patch new file mode 100644 index 00000000000..abff3f25f47 --- /dev/null +++ b/modules/rules_jvm_external/6.0/patches/module_dot_bazel.patch @@ -0,0 +1,10 @@ +--- MODULE.bazel ++++ MODULE.bazel +@@ -1,7 +1,6 @@ + module( + name = "rules_jvm_external", + version = "6.0", +- compatibility_level = 2, + ) + + bazel_dep( diff --git a/modules/rules_jvm_external/6.0/presubmit.yml b/modules/rules_jvm_external/6.0/presubmit.yml new file mode 100644 index 00000000000..dff96f6a3bd --- /dev/null +++ b/modules/rules_jvm_external/6.0/presubmit.yml @@ -0,0 +1,29 @@ +matrix: + platform: + - debian10 + - ubuntu2004 + - macos + - macos_arm64 + - windows +tasks: + verify_targets: + name: Verify build targets + platform: ${{ platform }} + build_targets: + - '@rules_jvm_external//:implementation' + - '@rules_jvm_external//private/tools/java/...' +bcr_test_module: + module_path: examples/bzlmod + matrix: + platform: + - debian10 + - ubuntu2004 + - macos + - macos_arm64 + - windows + tasks: + run_test_module: + name: Run test module + platform: ${{ platform }} + build_targets: + - //java/src/com/github/rules_jvm_external/examples/bzlmod:bzlmod_example diff --git a/modules/rules_jvm_external/6.0/source.json b/modules/rules_jvm_external/6.0/source.json new file mode 100644 index 00000000000..260ebfc76de --- /dev/null +++ b/modules/rules_jvm_external/6.0/source.json @@ -0,0 +1,9 @@ +{ + "url": "https://github.com/bazelbuild/rules_jvm_external/releases/download/6.0/rules_jvm_external-6.0.tar.gz", + "integrity": "sha256-hf1rrVisdsw6J8jgUeQlX/nM2MkrqHlnDRlWIufAqbc=", + "strip_prefix": "rules_jvm_external-6.0", + "patch_strip": 0, + "patches": { + "module_dot_bazel.patch": "sha256-+Ci4gFKoiHYV4zl1HFIS8JtdDSogzDh6neAEBNd+zLA=" + } +} diff --git a/modules/rules_jvm_external/metadata.json b/modules/rules_jvm_external/metadata.json index 27ca94f5100..71dbd96454d 100644 --- a/modules/rules_jvm_external/metadata.json +++ b/modules/rules_jvm_external/metadata.json @@ -25,7 +25,8 @@ "4.5", "5.1", "5.2", - "5.3" + "5.3", + "6.0" ], "yanked_versions": {} }