David Pursehouse | 2e566e8 | 2019-09-05 08:43:41 +0900 | [diff] [blame] | 1 | load("@rules_java//java:defs.bzl", "java_library") |
Paladox none | 1da3f05 | 2017-02-05 15:21:52 +0000 | [diff] [blame] | 2 | load("//tools/bzl:junit.bzl", "junit_tests") |
| 3 | load( |
| 4 | "//tools/bzl:plugin.bzl", |
Paladox none | 1da3f05 | 2017-02-05 15:21:52 +0000 | [diff] [blame] | 5 | "PLUGIN_DEPS", |
| 6 | "PLUGIN_TEST_DEPS", |
Paladox none | f21ff5e | 2018-10-08 21:56:45 +0000 | [diff] [blame] | 7 | "gerrit_plugin", |
Paladox none | 1da3f05 | 2017-02-05 15:21:52 +0000 | [diff] [blame] | 8 | ) |
David Pursehouse | fda58ef | 2017-01-19 19:23:54 +0900 | [diff] [blame] | 9 | |
| 10 | gerrit_plugin( |
| 11 | name = "lfs", |
| 12 | srcs = glob(["src/main/java/**/*.java"]), |
| 13 | manifest_entries = [ |
| 14 | "Gerrit-PluginName: lfs", |
| 15 | "Gerrit-Module: com.googlesource.gerrit.plugins.lfs.Module", |
| 16 | "Gerrit-HttpModule: com.googlesource.gerrit.plugins.lfs.HttpModule", |
| 17 | "Gerrit-SshModule: com.googlesource.gerrit.plugins.lfs.SshModule", |
David Pursehouse | c42313e | 2017-02-27 20:51:55 +0900 | [diff] [blame] | 18 | "Gerrit-InitStep: com.googlesource.gerrit.plugins.lfs.InitLfs", |
David Pursehouse | fda58ef | 2017-01-19 19:23:54 +0900 | [diff] [blame] | 19 | ], |
David Pursehouse | bed8f28 | 2017-11-02 16:35:51 +0900 | [diff] [blame] | 20 | resources = glob(["src/main/resources/**/*"]), |
David Pursehouse | fda58ef | 2017-01-19 19:23:54 +0900 | [diff] [blame] | 21 | deps = [ |
David Pursehouse | d446a53 | 2018-10-11 17:56:45 +0900 | [diff] [blame] | 22 | "@jgit-http-apache//jar", |
David Pursehouse | d446a53 | 2018-10-11 17:56:45 +0900 | [diff] [blame] | 23 | "@jgit-lfs-server//jar", |
David Pursehouse | aa7a05a | 2018-10-21 16:21:44 +0900 | [diff] [blame] | 24 | "@jgit-lfs//jar", |
Paladox none | 1da3f05 | 2017-02-05 15:21:52 +0000 | [diff] [blame] | 25 | ], |
| 26 | ) |
| 27 | |
| 28 | junit_tests( |
| 29 | name = "lfs_tests", |
| 30 | srcs = glob(["src/test/java/**/*.java"]), |
| 31 | tags = ["lfs"], |
Paladox none | f21ff5e | 2018-10-08 21:56:45 +0000 | [diff] [blame] | 32 | deps = [ |
| 33 | ":lfs__plugin_test_deps", |
David Pursehouse | fda58ef | 2017-01-19 19:23:54 +0900 | [diff] [blame] | 34 | ], |
| 35 | ) |
David Pursehouse | bed8f28 | 2017-11-02 16:35:51 +0900 | [diff] [blame] | 36 | |
| 37 | java_library( |
| 38 | name = "lfs__plugin_test_deps", |
| 39 | testonly = 1, |
| 40 | visibility = ["//visibility:public"], |
| 41 | exports = PLUGIN_DEPS + PLUGIN_TEST_DEPS + [ |
| 42 | ":lfs__plugin", |
David Pursehouse | aa7a05a | 2018-10-21 16:21:44 +0900 | [diff] [blame] | 43 | "@jgit-lfs//jar", |
David Pursehouse | a17d2b6 | 2018-11-05 19:37:10 +0900 | [diff] [blame] | 44 | "@joda-time//jar", |
David Pursehouse | bed8f28 | 2017-11-02 16:35:51 +0900 | [diff] [blame] | 45 | ], |
| 46 | ) |