blob: 7bff1f492963d0cdd9f9538f847a63b3082f350c [file]
module(name = "gerrit-index-elasticsearch")
bazel_dep(name = "platforms", version = "1.1.0")
bazel_dep(name = "rules_java", version = "9.9.0")
bazel_dep(name = "rules_jvm_external", version = "7.2")
bazel_dep(name = "com_googlesource_gerrit_bazlets")
git_override(
module_name = "com_googlesource_gerrit_bazlets",
commit = "a149563c735184151b2122c59019b2941af1cb60",
remote = "https://gerrit.googlesource.com/bazlets",
)
GERRIT_API_VERS = "3.14.4"
gerrit_api_version = use_repo_rule("@com_googlesource_gerrit_bazlets//:gerrit_api_version.bzl", "gerrit_api_version")
gerrit_api_version(
name = "gerrit_api_version",
version = GERRIT_API_VERS,
visibility = ["//visibility:public"],
)
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
name = "external_plugin_deps",
artifacts = [
"com.google.gerrit:gerrit-plugin-api:" + GERRIT_API_VERS,
"com.google.gerrit:gerrit-acceptance-framework:" + GERRIT_API_VERS,
],
# IMPORTANT:
# Do NOT set lock_file here.
#
# This repository is intentionally shared across plugins and contains
# only Gerrit-provided APIs (gerrit-plugin-api and acceptance framework)
# that are provided by Gerrit at runtime and must not be bundled into
# the plugin JAR.
#
# When built in-tree, rules_jvm_external merges maven.install() tags
# with the same name across all modules. Defining a lock_file for this
# shared repository in more than one plugin causes multiple lock files
# to be contributed for the same repository name, which is rejected by
# rules_jvm_external during module extension evaluation.
#
# Plugin runtime dependencies must instead be declared in a
# plugin-specific repository (e.g. oauth_plugin_deps) that owns
# its own lock file.
)
use_repo(maven, "external_plugin_deps")
maven.install(
name = "index-elasticsearch_plugin_deps",
artifacts = [
"com.fasterxml.jackson.core:jackson-core:2.11.3",
"org.apache.httpcomponents:httpasyncclient:4.1.5",
"org.elasticsearch.client:elasticsearch-rest-client:8.18.1",
"org.testcontainers:elasticsearch:1.21.0",
],
excluded_artifacts = [
"commons-codec:commons-codec",
"commons-logging:commons-logging",
"org.apache.httpcomponents:httpclient",
"org.apache.httpcomponents:httpcore",
"org.slf4j:jcl-over-slf4j",
"org.slf4j:slf4j-api",
],
duplicate_version_warning = "error",
fail_if_repin_required = True,
fail_on_missing_checksum = True,
fetch_sources = True,
lock_file = "//:index-elasticsearch_plugin_deps.lock.json",
repositories = [
"https://repo1.maven.org/maven2",
],
version_conflict_policy = "pinned",
)
use_repo(maven, "index-elasticsearch_plugin_deps")