David Pursehouse | 76515aa | 2019-09-05 08:43:41 +0900 | [diff] [blame] | 1 | load("@rules_java//java:defs.bzl", "java_library") |
David Ostrovsky | e435bbd | 2018-03-04 09:10:19 +0100 | [diff] [blame] | 2 | load("//tools/bzl:junit.bzl", "junit_tests") |
| 3 | load( |
| 4 | "//tools/bzl:plugin.bzl", |
David Ostrovsky | e435bbd | 2018-03-04 09:10:19 +0100 | [diff] [blame] | 5 | "PLUGIN_DEPS", |
David Pursehouse | 5723bd7 | 2018-10-22 08:47:51 +0900 | [diff] [blame] | 6 | "PLUGIN_TEST_DEPS", |
David Pursehouse | 86ad3a0 | 2018-07-18 09:29:32 +0900 | [diff] [blame] | 7 | "gerrit_plugin", |
David Ostrovsky | e435bbd | 2018-03-04 09:10:19 +0100 | [diff] [blame] | 8 | ) |
David Ostrovsky | 41759c8 | 2016-11-01 09:17:20 +0100 | [diff] [blame] | 9 | |
| 10 | gerrit_plugin( |
| 11 | name = "oauth", |
| 12 | srcs = glob(["src/main/java/**/*.java"]), |
| 13 | manifest_entries = [ |
| 14 | "Gerrit-PluginName: gerrit-oauth-provider", |
David Ostrovsky | a29e972 | 2017-03-02 09:28:52 +0100 | [diff] [blame] | 15 | "Gerrit-Module: com.googlesource.gerrit.plugins.oauth.Module", |
David Ostrovsky | 41759c8 | 2016-11-01 09:17:20 +0100 | [diff] [blame] | 16 | "Gerrit-HttpModule: com.googlesource.gerrit.plugins.oauth.HttpModule", |
| 17 | "Gerrit-InitStep: com.googlesource.gerrit.plugins.oauth.InitOAuth", |
| 18 | "Implementation-Title: Gerrit OAuth authentication provider", |
| 19 | "Implementation-URL: https://github.com/davido/gerrit-oauth-provider", |
| 20 | ], |
| 21 | resources = glob(["src/main/resources/**/*"]), |
| 22 | deps = [ |
David Pursehouse | d80a5ce | 2018-06-14 13:54:43 +0900 | [diff] [blame] | 23 | "@commons-codec//jar:neverlink", |
David Ostrovsky | 23db10a | 2020-02-09 13:20:25 +0100 | [diff] [blame] | 24 | "@jackson-databind//jar", |
| 25 | "@scribejava-core//jar", |
David Ostrovsky | 41759c8 | 2016-11-01 09:17:20 +0100 | [diff] [blame] | 26 | ], |
| 27 | ) |
David Ostrovsky | e435bbd | 2018-03-04 09:10:19 +0100 | [diff] [blame] | 28 | |
| 29 | junit_tests( |
| 30 | name = "oauth_tests", |
| 31 | srcs = glob(["src/test/java/**/*.java"]), |
| 32 | tags = ["oauth"], |
David Pursehouse | 5723bd7 | 2018-10-22 08:47:51 +0900 | [diff] [blame] | 33 | deps = [ |
| 34 | ":oauth__plugin_test_deps", |
David Ostrovsky | 4218f62 | 2020-03-08 18:14:04 +0100 | [diff] [blame] | 35 | "@scribejava-core//jar", |
David Pursehouse | 5723bd7 | 2018-10-22 08:47:51 +0900 | [diff] [blame] | 36 | ], |
| 37 | ) |
| 38 | |
| 39 | java_library( |
| 40 | name = "oauth__plugin_test_deps", |
| 41 | testonly = 1, |
| 42 | visibility = ["//visibility:public"], |
| 43 | exports = PLUGIN_DEPS + PLUGIN_TEST_DEPS + [ |
David Ostrovsky | e435bbd | 2018-03-04 09:10:19 +0100 | [diff] [blame] | 44 | ":oauth__plugin", |
David Ostrovsky | e435bbd | 2018-03-04 09:10:19 +0100 | [diff] [blame] | 45 | ], |
| 46 | ) |