-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathBUILD
71 lines (66 loc) · 2.22 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
load("@rules_java//java:defs.bzl", "java_library")
load("//tools/bzl:junit.bzl", "junit_tests")
load("//tools/bzl:plugin.bzl", "PLUGIN_DEPS", "PLUGIN_TEST_DEPS", "gerrit_plugin")
gerrit_plugin(
name = "replication",
srcs = glob(["src/main/java/**/*.java"]),
manifest_entries = [
"Implementation-Title: Replication plugin",
"Implementation-URL: https://gerrit-review.googlesource.com/#/admin/projects/plugins/replication",
"Gerrit-PluginName: replication",
"Gerrit-InitStep: com.googlesource.gerrit.plugins.replication.Init",
"Gerrit-Module: com.googlesource.gerrit.plugins.replication.ReplicationModule",
"Gerrit-SshModule: com.googlesource.gerrit.plugins.replication.SshModule",
],
resources = glob(["src/main/resources/**/*"]),
deps = [
"//plugins/replication:replication-api",
],
)
gerrit_plugin(
name = "replication-api",
srcs = glob(
["src/main/java/com/googlesource/gerrit/plugins/replication/api/*.java"],
),
dir_name = "replication",
manifest_entries = [
"Implementation-Title: Replication plugin API",
"Implementation-URL: https://gerrit-review.googlesource.com/#/admin/projects/plugins/replication",
"Gerrit-PluginName: replication-api",
"Gerrit-ApiModule: com.googlesource.gerrit.plugins.replication.api.ApiModule",
],
)
junit_tests(
name = "replication_tests",
timeout = "long",
srcs = glob([
"src/test/java/**/*Test.java",
]),
tags = ["replication"],
visibility = ["//visibility:public"],
deps = PLUGIN_TEST_DEPS + PLUGIN_DEPS + [
":replication__plugin",
":replication_util",
],
)
[junit_tests(
name = f[:f.index(".")].replace("/", "_"),
srcs = [f],
tags = ["replication"],
visibility = ["//visibility:public"],
deps = PLUGIN_TEST_DEPS + PLUGIN_DEPS + [
":replication__plugin",
":replication_util",
],
) for f in glob(["src/test/java/**/*IT.java"])]
java_library(
name = "replication_util",
testonly = True,
srcs = glob(
["src/test/java/**/*.java"],
exclude = ["src/test/java/**/*Test.java"],
),
deps = PLUGIN_TEST_DEPS + PLUGIN_DEPS + [
":replication__plugin",
],
)