blob: 4f7e6544f9b98ebaff993200488dee18c7b1056b [file] [log] [blame] [edit]
load("//tools/bzl:junit.bzl", "junit_tests")
load(
"//tools/bzl:plugin.bzl",
"PLUGIN_DEPS",
"PLUGIN_TEST_DEPS",
"gerrit_plugin",
)
gerrit_plugin(
name = "spanner-refdb",
srcs = glob(["src/main/java/**/*.java"]),
manifest_entries = [
"Gerrit-PluginName: spanner-refdb",
"Gerrit-Module: com.googlesource.gerrit.plugins.spannerrefdb.Module",
"Implementation-Title: Google Cloud Spanner shared ref-database implementation",
"Implementation-URL: https://gerrit.googlesource.com/plugins/spanner-refdb",
],
resources = glob(["src/main/resources/**/*"]),
deps = [
":global-refdb-neverlink",
"@google-cloud-spanner-with-dependencies//jar",
],
)
junit_tests(
name = "spanner-refdb_tests",
srcs = glob(["src/test/java/**/*Test.java"]),
resources = glob(["src/main/resources/**/*"]),
tags = ["spanner-refdb"],
deps = [
":spanner-refdb_test_util",
":spanner-refdb__plugin_test_deps",
],
)
java_library(
name = "spanner-refdb_test_util",
testonly = True,
srcs = glob(
["src/test/java/**/*.java"],
exclude = ["src/test/java/**/*Test.java"],
),
deps = [
":spanner-refdb__plugin_test_deps",
]
)
java_library(
name = "spanner-refdb__plugin_test_deps",
testonly = 1,
visibility = ["//visibility:public"],
exports = PLUGIN_DEPS + PLUGIN_TEST_DEPS + [
":spanner-refdb__plugin",
"//plugins/global-refdb",
"@docker-java-api//jar",
"@docker-java-transport-zerodep//jar",
"@docker-java-transport//jar",
"@duct-tape//jar",
"@google-cloud-spanner-with-dependencies//jar",
"@jackson-annotations//jar",
"@jna//jar",
"@testcontainer-gcloud//jar",
"@testcontainers//jar",
],
)
java_library(
name = "global-refdb-neverlink",
neverlink = 1,
exports = ["//plugins/global-refdb"],
)