blob: 413ef468dbdebd306978dc87b2afb465d825aa16 [file] [log] [blame]
Serge Bazanskibfa4a652020-12-17 20:50:29 +01001load("@rules_java//java:defs.bzl", "java_library")
Sergiusz Bazanski57efce62019-07-21 16:39:54 +02002load("//devtools/gerrit/gerrit-oauth-provider/tools/bzl:junit.bzl", "junit_tests")
Sergiusz Bazanski573da782019-06-21 19:59:52 +02003load(
Sergiusz Bazanski57efce62019-07-21 16:39:54 +02004 "//devtools/gerrit/gerrit-oauth-provider/tools/bzl:plugin.bzl",
Sergiusz Bazanski573da782019-06-21 19:59:52 +02005 "PLUGIN_DEPS",
6 "PLUGIN_TEST_DEPS",
7 "gerrit_plugin",
8)
9
10gerrit_plugin(
11 name = "gerrit-oauth-provider",
12 srcs = glob(["src/main/java/**/*.java"]),
13 manifest_entries = [
14 "Gerrit-PluginName: gerrit-oauth-provider",
15 "Gerrit-HttpModule: com.googlesource.gerrit.plugins.oauth.HttpModule",
16 "Gerrit-InitStep: com.googlesource.gerrit.plugins.oauth.InitOAuth",
17 "Implementation-Title: Gerrit OAuth authentication provider",
18 "Implementation-URL: https://github.com/davido/gerrit-oauth-provider",
19 ],
20 resources = glob(["src/main/resources/**/*"]),
21 deps = [
22 "@commons-codec//jar:neverlink",
Serge Bazanskibfa4a652020-12-17 20:50:29 +010023 "@jackson-databind//jar",
24 "@scribejava-core//jar",
Sergiusz Bazanski573da782019-06-21 19:59:52 +020025 ],
26)
27
28junit_tests(
29 name = "gerrit-oauth-provider_tests",
30 srcs = glob(["src/test/java/**/*.java"]),
31 tags = ["oauth"],
32 deps = [
33 ":gerrit-oauth-provider__plugin_test_deps",
Serge Bazanskibfa4a652020-12-17 20:50:29 +010034 "@scribejava-core//jar",
Sergiusz Bazanski573da782019-06-21 19:59:52 +020035 ],
36)
37
38java_library(
39 name = "gerrit-oauth-provider__plugin_test_deps",
40 testonly = 1,
41 visibility = ["//visibility:public"],
42 exports = PLUGIN_DEPS + PLUGIN_TEST_DEPS + [
43 ":gerrit-oauth-provider__plugin",
Sergiusz Bazanski573da782019-06-21 19:59:52 +020044 ],
45)