blob: 8eb7d2a2f932fc2c6814c4a653b292192800efe4 [file] [log] [blame]
David Pursehouse2e566e82019-09-05 08:43:41 +09001load("@rules_java//java:defs.bzl", "java_library")
Paladox none1da3f052017-02-05 15:21:52 +00002load("//tools/bzl:junit.bzl", "junit_tests")
3load(
4 "//tools/bzl:plugin.bzl",
Paladox none1da3f052017-02-05 15:21:52 +00005 "PLUGIN_DEPS",
6 "PLUGIN_TEST_DEPS",
Paladox nonef21ff5e2018-10-08 21:56:45 +00007 "gerrit_plugin",
Paladox none1da3f052017-02-05 15:21:52 +00008)
David Pursehousefda58ef2017-01-19 19:23:54 +09009
10gerrit_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 Pursehousec42313e2017-02-27 20:51:55 +090018 "Gerrit-InitStep: com.googlesource.gerrit.plugins.lfs.InitLfs",
David Pursehousefda58ef2017-01-19 19:23:54 +090019 ],
David Pursehousebed8f282017-11-02 16:35:51 +090020 resources = glob(["src/main/resources/**/*"]),
David Pursehousefda58ef2017-01-19 19:23:54 +090021 deps = [
David Pursehoused446a532018-10-11 17:56:45 +090022 "@jgit-http-apache//jar",
David Pursehoused446a532018-10-11 17:56:45 +090023 "@jgit-lfs-server//jar",
David Pursehouseaa7a05a2018-10-21 16:21:44 +090024 "@jgit-lfs//jar",
Paladox none1da3f052017-02-05 15:21:52 +000025 ],
26)
27
28junit_tests(
29 name = "lfs_tests",
30 srcs = glob(["src/test/java/**/*.java"]),
31 tags = ["lfs"],
Paladox nonef21ff5e2018-10-08 21:56:45 +000032 deps = [
33 ":lfs__plugin_test_deps",
David Pursehousefda58ef2017-01-19 19:23:54 +090034 ],
35)
David Pursehousebed8f282017-11-02 16:35:51 +090036
37java_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 Pursehouseaa7a05a2018-10-21 16:21:44 +090043 "@jgit-lfs//jar",
David Pursehousea17d2b62018-11-05 19:37:10 +090044 "@joda-time//jar",
David Pursehousebed8f282017-11-02 16:35:51 +090045 ],
46)