blob: 01d9a2fdfa657b3cc1865eff05b4b48b13b97189 [file] [log] [blame]
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//jar",
"@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",
"@docker-java-api//jar",
"@docker-java-transport-zerodep//jar",
"@docker-java-transport//jar",
"@duct-tape//jar",
"@global-refdb//jar",
"@google-cloud-spanner-with-dependencies//jar",
"@jackson-annotations//jar",
"@jna//jar",
"@testcontainer-gcloud//jar",
"@testcontainers//jar",
],
)