c5f8066629
We cannot shade bouncycastle in the plugin API. Still we need it to be included in the gerrit.war, licenses file and Eclipse classpath. Expose bouncycastle libraries in PLUGIN_TEST_DEPS constant, so that the plugins don't need to change anything in tree build mode. gerrit_api() bazlet in bazlets repository is extended too, so that the plugins don't need to change anything in standalone build mode. One side effect of this change, is that bouncycastle libraries are now listed with neverlink suffix, e.g.: * bouncycastle:bcprov-neverlink Bug: Issue 5826 Change-Id: Idb8051e16b14e20c8dd528783ab297ee25707bb3
60 lines
1.4 KiB
Python
60 lines
1.4 KiB
Python
load("//tools/bzl:junit.bzl", "junit_tests")
|
|
|
|
DEPS = [
|
|
"//gerrit-common:server",
|
|
"//gerrit-extension-api:api",
|
|
"//gerrit-reviewdb:server",
|
|
"//gerrit-server:server",
|
|
"//lib:guava",
|
|
"//lib:gwtorm",
|
|
"//lib/guice:guice",
|
|
"//lib/guice:guice-assistedinject",
|
|
"//lib/guice:guice-servlet",
|
|
"//lib/jgit/org.eclipse.jgit:jgit",
|
|
"//lib/log:api",
|
|
]
|
|
|
|
java_library(
|
|
name = "gpg",
|
|
srcs = glob(["src/main/java/**/*.java"]),
|
|
visibility = ["//visibility:public"],
|
|
deps = DEPS + [
|
|
"//lib/bouncycastle:bcpg-neverlink",
|
|
"//lib/bouncycastle:bcprov-neverlink",
|
|
],
|
|
)
|
|
|
|
TESTUTIL_SRCS = glob(["src/test/**/testutil/**/*.java"])
|
|
|
|
java_library(
|
|
name = "testutil",
|
|
testonly = 1,
|
|
srcs = TESTUTIL_SRCS,
|
|
visibility = ["//visibility:public"],
|
|
deps = DEPS + [
|
|
"//lib/bouncycastle:bcpg-neverlink",
|
|
"//lib/bouncycastle:bcprov-neverlink",
|
|
":gpg",
|
|
],
|
|
)
|
|
|
|
junit_tests(
|
|
name = "gpg_tests",
|
|
srcs = glob(
|
|
["src/test/java/**/*.java"],
|
|
exclude = TESTUTIL_SRCS,
|
|
),
|
|
visibility = ["//visibility:public"],
|
|
deps = DEPS + [
|
|
":gpg",
|
|
":testutil",
|
|
"//gerrit-cache-h2:cache-h2",
|
|
"//gerrit-lucene:lucene",
|
|
"//gerrit-server:testutil",
|
|
"//lib:truth",
|
|
"//lib/jgit/org.eclipse.jgit.junit:junit",
|
|
"//lib/bouncycastle:bcpg",
|
|
"//lib/bouncycastle:bcprov",
|
|
],
|
|
)
|