blob: 241ad4265bee2d5fdba823558cd1f76cec19cf28 [file] [log] [blame]
David Pursehouse1676b992019-09-05 08:43:41 +09001load("@rules_java//java:defs.bzl", "java_binary", "java_library")
Jacek Centkowskib1ffb5f2017-11-16 13:02:13 +01002load("//tools/bzl:junit.bzl", "junit_tests")
3load(
4 "//tools/bzl:plugin.bzl",
Jacek Centkowskib1ffb5f2017-11-16 13:02:13 +01005 "PLUGIN_DEPS",
Jacek Centkowskib1ffb5f2017-11-16 13:02:13 +01006 "PLUGIN_TEST_DEPS",
David Pursehousef22928b2018-10-11 12:56:43 +09007 "gerrit_plugin",
Jacek Centkowskib1ffb5f2017-11-16 13:02:13 +01008)
Paladox none37f8b6c2017-02-19 12:09:14 +00009
10gerrit_plugin(
11 name = "javamelody",
David Ostrovsky3984b6d2018-11-28 03:16:10 +010012 srcs = glob(["src/main/java/**/*.java"]),
Paladox none37f8b6c2017-02-19 12:09:14 +000013 manifest_entries = [
14 "Gerrit-PluginName: javamelody",
15 "Gerrit-Module: com.googlesource.gerrit.plugins.javamelody.Module",
16 "Gerrit-HttpModule: com.googlesource.gerrit.plugins.javamelody.HttpModule",
17 "Implementation-Title: Javamelody plugin",
18 "Implementation-URL: https://gerrit-review.googlesource.com/#/admin/projects/plugins/javamelody",
19 ],
20 resources = glob(["src/main/resources/**/*"]),
David Ostrovsky3984b6d2018-11-28 03:16:10 +010021 deps = [
David Ostrovsky3bd28f52018-06-14 08:12:16 +020022 "@javamelody-core//jar",
23 "@jrobin//jar",
Paladox none37f8b6c2017-02-19 12:09:14 +000024 ],
25)
Jacek Centkowskib1ffb5f2017-11-16 13:02:13 +010026
27junit_tests(
28 name = "javamelody_tests",
29 srcs = glob(["src/test/java/**/*.java"]),
30 tags = ["javamelody"],
31 deps = [
32 ":javamelody__plugin_test_deps",
33 ],
34)
35
36java_library(
37 name = "javamelody__plugin_test_deps",
38 testonly = 1,
39 visibility = ["//visibility:public"],
40 exports = PLUGIN_DEPS + PLUGIN_TEST_DEPS + [
41 ":javamelody__plugin",
David Ostrovsky3bd28f52018-06-14 08:12:16 +020042 "@javamelody-core//jar",
Jacek Centkowskib1ffb5f2017-11-16 13:02:13 +010043 ],
David Pursehousec0287c12017-11-22 08:16:33 +090044)