blob: 3663c7dbdbbe1bdb542def844be738bd4fe69837 [file] [log] [blame]
David Ostrovskyfa189072016-11-30 08:52:06 +01001load("//tools/bzl:genrule2.bzl", "genrule2")
David Pursehouse1d536682019-01-10 21:44:13 +09002load("//tools/bzl:javadoc.bzl", "java_doc")
Jacek Centkowski75d1c182017-02-24 14:59:15 +01003load(
4 "//tools/bzl:plugins.bzl",
5 "CORE_PLUGINS",
6 "CUSTOM_PLUGINS",
7)
David Ostrovskyaf719682016-09-28 20:31:18 +02008
9genrule2(
David Ostrovskyfa189072016-11-30 08:52:06 +010010 name = "core",
Jacek Centkowski75d1c182017-02-24 14:59:15 +010011 srcs = ["//plugins/%s:%s.jar" % (n, n) for n in CORE_PLUGINS + CUSTOM_PLUGINS],
David Ostrovskyfa189072016-11-30 08:52:06 +010012 outs = ["core.zip"],
13 cmd = "mkdir -p $$TMP/WEB-INF/plugins;" +
14 "for s in $(SRCS) ; do " +
15 "ln -s $$ROOT/$$s $$TMP/WEB-INF/plugins;done;" +
16 "cd $$TMP;" +
17 "zip -qr $$ROOT/$@ .",
18 visibility = ["//visibility:public"],
David Ostrovskyaf719682016-09-28 20:31:18 +020019)
David Ostrovsky32c69332017-08-24 22:10:33 +020020
21PLUGIN_API = [
David Ostrovsky590071e2017-09-21 22:54:20 +020022 "//java/com/google/gerrit/server",
Han-Wen Nienhuysfd6962b2018-07-06 15:39:30 +020023 "//java/com/google/gerrit/server/ioutil",
David Ostrovskye1f11c72018-01-18 06:35:24 +010024 "//java/com/google/gerrit/server/restapi",
David Ostrovsky32c69332017-08-24 22:10:33 +020025 "//java/com/google/gerrit/pgm/init/api",
David Ostrovsky32c69332017-08-24 22:10:33 +020026 "//java/com/google/gerrit/httpd",
27 "//java/com/google/gerrit/sshd",
28]
29
30EXPORTS = [
David Ostrovskyf51cf232018-08-31 06:19:26 +020031 "//antlr3:query_parser",
David Ostrovsky32c69332017-08-24 22:10:33 +020032 "//java/com/google/gerrit/common:annotations",
33 "//java/com/google/gerrit/common:server",
Dave Borowitz62f32fc2019-01-15 18:45:22 -080034 "//java/com/google/gerrit/exceptions",
David Ostrovsky32c69332017-08-24 22:10:33 +020035 "//java/com/google/gerrit/extensions:api",
Dave Borowitz3770c702018-11-13 17:07:14 -080036 "//java/com/google/gerrit/git",
David Ostrovsky32c69332017-08-24 22:10:33 +020037 "//java/com/google/gerrit/index",
Luca Milanesiobd73b492018-12-29 20:11:41 +000038 "//java/com/google/gerrit/index/project",
David Ostrovsky32c69332017-08-24 22:10:33 +020039 "//java/com/google/gerrit/index:query_exception",
Dave Borowitz87bfe682018-12-18 17:59:29 -080040 "//java/com/google/gerrit/json",
David Ostrovsky32c69332017-08-24 22:10:33 +020041 "//java/com/google/gerrit/lifecycle",
David Ostrovskyda429b72019-01-29 09:04:01 +010042 "//java/com/google/gerrit/mail",
David Ostrovsky32c69332017-08-24 22:10:33 +020043 "//java/com/google/gerrit/metrics",
44 "//java/com/google/gerrit/metrics/dropwizard",
45 "//java/com/google/gerrit/reviewdb:server",
David Ostrovskyfc1a9c72019-04-17 07:51:58 -070046 "//java/com/google/gerrit/server/api",
David Ostrovsky37748ec2018-08-14 08:36:11 +020047 "//java/com/google/gerrit/server/audit",
David Pursehousea1dacf12019-01-25 11:37:14 +090048 "//java/com/google/gerrit/server/cache/mem",
Dave Borowitz0347a822019-05-02 07:39:11 -070049 "//java/com/google/gerrit/server/cache/serialize",
Edwin Kempin87527aa2018-09-06 16:12:54 +020050 "//java/com/google/gerrit/server/logging",
David Ostrovsky460a3f32018-09-04 08:13:51 +020051 "//java/com/google/gerrit/server/schema",
Edwin Kempinad196262018-09-18 17:55:51 +020052 "//java/com/google/gerrit/server/util/time",
David Pursehouse562b1662018-11-17 00:31:41 -080053 "//java/com/google/gerrit/util/cli",
Dave Borowitz791da3a642018-06-12 10:52:22 -040054 "//java/com/google/gerrit/util/http",
David Ostrovskyfc1a9c72019-04-17 07:51:58 -070055 "//lib/antlr:java-runtime",
56 "//lib/auto:auto-value-annotations",
David Pursehouse4610fca2018-07-17 12:56:33 +090057 "//lib/commons:compress",
David Ostrovsky32c69332017-08-24 22:10:33 +020058 "//lib/commons:dbcp",
59 "//lib/commons:lang",
David Ostrovsky32c69332017-08-24 22:10:33 +020060 "//lib/dropwizard:dropwizard-core",
Edwin Kempin8860e8e2018-05-08 11:19:37 +020061 "//lib/flogger:api",
David Ostrovsky32c69332017-08-24 22:10:33 +020062 "//lib/guice:guice",
63 "//lib/guice:guice-assistedinject",
64 "//lib/guice:guice-servlet",
David Ostrovskye1359a32018-06-08 09:16:50 +020065 "//lib/guice:javax_inject",
David Ostrovsky32c69332017-08-24 22:10:33 +020066 "//lib/httpcomponents:httpclient",
67 "//lib/httpcomponents:httpcore",
Hector Oswaldo Caballerocbc86c62017-12-22 09:01:53 -050068 "//lib/jackson:jackson-core",
David Ostrovsky32c69332017-08-24 22:10:33 +020069 "//lib/jgit/org.eclipse.jgit.http.server:jgit-servlet",
70 "//lib/jgit/org.eclipse.jgit:jgit",
71 "//lib/log:api",
72 "//lib/log:log4j",
73 "//lib/mina:sshd",
74 "//lib/ow2:ow2-asm",
75 "//lib/ow2:ow2-asm-analysis",
76 "//lib/ow2:ow2-asm-commons",
77 "//lib/ow2:ow2-asm-util",
78 "//lib:args4j",
79 "//lib:blame-cache",
80 "//lib:guava",
81 "//lib:guava-retrying",
82 "//lib:gson",
David Ostrovsky32c69332017-08-24 22:10:33 +020083 "//lib:icu4j",
84 "//lib:jsch",
85 "//lib:mime-util",
86 "//lib:protobuf",
87 "//lib:servlet-api-3_1-without-neverlink",
88 "//lib:soy",
89 "//prolog:gerrit-prolog-common",
90]
91
92java_binary(
93 name = "plugin-api",
94 main_class = "Dummy",
95 visibility = ["//visibility:public"],
96 runtime_deps = [":plugin-lib"],
97)
98
99java_library(
100 name = "plugin-lib",
101 visibility = ["//visibility:public"],
102 exports = PLUGIN_API + EXPORTS,
103)
104
105java_library(
106 name = "plugin-lib-neverlink",
107 neverlink = 1,
108 visibility = ["//visibility:public"],
109 exports = PLUGIN_API + EXPORTS,
110)
111
112java_binary(
113 name = "plugin-api-sources",
114 main_class = "Dummy",
115 visibility = ["//visibility:public"],
116 runtime_deps = [
David Ostrovskyf51cf232018-08-31 06:19:26 +0200117 "//antlr3:libquery_parser-src.jar",
David Ostrovsky32c69332017-08-24 22:10:33 +0200118 "//java/com/google/gerrit/common:libannotations-src.jar",
119 "//java/com/google/gerrit/common:libserver-src.jar",
120 "//java/com/google/gerrit/extensions:libapi-src.jar",
121 "//java/com/google/gerrit/httpd:libhttpd-src.jar",
122 "//java/com/google/gerrit/index:libindex-src.jar",
123 "//java/com/google/gerrit/index:libquery_exception-src.jar",
David Ostrovsky32c69332017-08-24 22:10:33 +0200124 "//java/com/google/gerrit/pgm/init/api:libapi-src.jar",
125 "//java/com/google/gerrit/reviewdb:libserver-src.jar",
David Ostrovsky590071e2017-09-21 22:54:20 +0200126 "//java/com/google/gerrit/server:libserver-src.jar",
David Ostrovskye1f11c72018-01-18 06:35:24 +0100127 "//java/com/google/gerrit/server/restapi:librestapi-src.jar",
David Ostrovsky32c69332017-08-24 22:10:33 +0200128 "//java/com/google/gerrit/sshd:libsshd-src.jar",
Dave Borowitz791da3a642018-06-12 10:52:22 -0400129 "//java/com/google/gerrit/util/http:libhttp-src.jar",
David Ostrovsky32c69332017-08-24 22:10:33 +0200130 ],
131)
132
David Ostrovsky32c69332017-08-24 22:10:33 +0200133java_doc(
134 name = "plugin-api-javadoc",
135 libs = PLUGIN_API + [
David Ostrovskyf51cf232018-08-31 06:19:26 +0200136 "//antlr3:query_parser",
David Ostrovsky32c69332017-08-24 22:10:33 +0200137 "//java/com/google/gerrit/index",
138 "//java/com/google/gerrit/index:query_exception",
David Ostrovsky32c69332017-08-24 22:10:33 +0200139 "//java/com/google/gerrit/common:annotations",
140 "//java/com/google/gerrit/common:server",
141 "//java/com/google/gerrit/extensions:api",
David Ostrovsky32c69332017-08-24 22:10:33 +0200142 "//java/com/google/gerrit/reviewdb:server",
Dave Borowitz791da3a642018-06-12 10:52:22 -0400143 "//java/com/google/gerrit/util/http",
David Ostrovsky32c69332017-08-24 22:10:33 +0200144 ],
145 pkgs = ["com.google.gerrit"],
146 title = "Gerrit Review Plugin API Documentation",
147 visibility = ["//visibility:public"],
148)