blob: fc8d6ec916a51f4b942bc5ccdca53155c70348f5 [file] [log] [blame]
David Ostrovsky65edbe42017-08-19 12:18:47 +02001# TODO(davido): Move sources that depend on the rest of gitiles
2# out of the blame directory and move this rule into its own BUILD
3# file in blame directory.
4BLAME_CACHE_SRCS = ["blame/" + n for n in [
5 "BlameCache.java",
6 "BlameCacheImpl.java",
7 "Region.java",
8]]
9
10java_library(
11 name = "blame-cache",
12 srcs = BLAME_CACHE_SRCS,
13 visibility = ["//visibility:public"],
14 deps = [
15 "//lib:guava",
16 "//lib/jgit",
17 ],
18)
19
20load("@com_googlesource_gerrit_bazlets//tools:javadoc.bzl", "java_doc")
21
22java_doc(
23 name = "blame-cache-javadoc",
24 libs = [
25 ":blame-cache",
26 "//lib:guava",
27 "//lib/jgit:jgit",
28 ],
29 pkgs = ["com.google.gitiles.blame"],
30 title = "Blame Cache API Documentation",
31 visibility = ["//visibility:public"],
32)
33
34DEPS = [
35 ":blame-cache",
36 "//lib:autolink",
37 "//lib:commons-lang3",
38 "//lib:gson",
39 "//lib:guava",
40 "//lib:html-types",
41 "//lib:joda-time",
42 "//lib:jsr305",
43 "//lib:commonmark",
44 "//lib:cm-autolink",
45 "//lib:gfm-tables",
46 "//lib:gfm-strikethrough",
47 "//lib:prettify",
48 "//lib/jgit:jgit",
49 "//lib/jgit:jgit-servlet",
50 "//lib/slf4j:slf4j-api",
51 "//lib/soy:soy",
52]
53
54DEPS_ALL = DEPS + [
55 "//lib/jgit:jgit-archive",
56 "//lib/guice:guice",
57]
58
59java_library(
60 name = "servlet-api",
61 neverlink = 1,
62 exports = ["//lib:servlet-api_2_5"],
63)
64
65java_library(
66 name = "servlet",
67 srcs = glob(
68 ["**/*.java"],
69 exclude = BLAME_CACHE_SRCS,
70 ),
71 resource_strip_prefix = "resources",
72 resources = ["//resources/com/google/gitiles"],
73 visibility = ["//visibility:public"],
74 deps = DEPS_ALL + [
75 ":servlet-api",
76 ],
77)
78
79load("@com_googlesource_gerrit_bazlets//tools:javadoc.bzl", "java_doc")
80
81java_doc(
82 name = "servlet-javadoc",
83 libs = DEPS + [
84 ":servlet",
85 ],
86 pkgs = ["com.google.gitiles"],
87 title = "Gitiles API Documentation",
88 visibility = ["//visibility:public"],
89)