gerrit/gerrit-war/BUILD
Dave Borowitz 798b883b40 Move ReceiveCommits and related classes to their own package
After naively moving the classes, there were almost no incoming
references from the rest of the server packages into the new
server.receive package. This means with only a little more work, it was
possible to create a new java_library target containing just the srcs
in this new package. This is a modest step in the direction of breaking
up the giant //gerrit-server:server package, which will improve compile
times when making modifications that don't change the interface.

Change-Id: I449018a4933a999c688611142dc7ed9c18b4c828
2017-08-08 10:50:06 -04:00

74 lines
1.9 KiB
Python

load("//tools/bzl:genrule2.bzl", "genrule2")
java_library(
name = "init",
srcs = glob(["src/main/java/**/*.java"]),
visibility = ["//visibility:public"],
deps = [
"//gerrit-cache-h2:cache-h2",
"//gerrit-elasticsearch:elasticsearch",
"//gerrit-extension-api:api",
"//gerrit-gpg:gpg",
"//gerrit-httpd:httpd",
"//gerrit-lucene:lucene",
"//gerrit-oauth:oauth",
"//gerrit-openid:openid",
"//gerrit-pgm:http",
"//gerrit-pgm:init",
"//gerrit-pgm:init-api",
"//gerrit-pgm:util",
"//gerrit-reviewdb:server",
"//gerrit-server:module",
"//gerrit-server:prolog-common",
"//gerrit-server:receive",
"//gerrit-server:server",
"//gerrit-sshd:sshd",
"//lib:guava",
"//lib:gwtorm",
"//lib:servlet-api-3_1",
"//lib/guice",
"//lib/guice:guice-servlet",
"//lib/jgit/org.eclipse.jgit:jgit",
"//lib/log:api",
],
)
genrule2(
name = "webapp_assets",
srcs = glob(["src/main/webapp/**/*"]),
outs = ["webapp_assets.zip"],
cmd = "cd gerrit-war/src/main/webapp; zip -qr $$ROOT/$@ .",
visibility = ["//visibility:public"],
)
java_import(
name = "log4j-config",
jars = [":log4j-config__jar"],
visibility = ["//visibility:public"],
)
genrule2(
name = "log4j-config__jar",
srcs = ["src/main/resources/log4j.properties"],
outs = ["log4j-config.jar"],
cmd = "cd gerrit-war/src/main/resources && zip -9Dqr $$ROOT/$@ .",
)
java_import(
name = "version",
jars = [":gen_version"],
visibility = ["//visibility:public"],
)
genrule2(
name = "gen_version",
outs = ["gen_version.jar"],
cmd = " && ".join([
"cd $$TMP",
"mkdir -p com/google/gerrit/common",
"cat $$ROOT/$(location //:version.txt) >com/google/gerrit/common/Version",
"zip -9Dqr $$ROOT/$@ .",
]),
tools = ["//:version.txt"],
)