blob: ba42d3e925f0120f983529aef0ff70179d89107a [file] [log] [blame]
Shawn Pearcefd6bb9f2013-05-08 14:14:24 -07001include_defs('//tools/build.defs')
2
3gerrit_war(name = 'gerrit')
4gerrit_war(name = 'chrome', ui = 'draft_safari')
5gerrit_war(name = 'firefox', ui = 'draft_gecko1_8')
6gerrit_war(name = 'withdocs', context = DOCS)
7gerrit_war(name = 'release', context = DOCS + ['//plugins:core.zip'])
8
9genrule(
10 name = 'api',
11 cmd = 'echo',
12 srcs = [],
13 deps = [
14 ':extension-api',
15 ':plugin-api',
16 ],
17 out = '__api__',
18)
19
20java_binary(name = 'extension-api', deps = [':extension-lib'])
21java_library(
22 name = 'extension-lib',
23 deps = [
24 '//gerrit-extension-api:api',
25 '//lib/guice:guice',
26 '//lib/guice:guice-servlet',
27 '//lib:servlet-api-3_0',
28 ],
29 visibility = ['PUBLIC'],
30)
31
32java_binary(name = 'plugin-api', deps = [':plugin-lib'])
33java_library(
34 name = 'plugin-lib',
35 deps = [
36 '//gerrit-server:server',
37 '//gerrit-sshd:sshd',
38 '//gerrit-httpd:httpd',
39 ],
40 visibility = ['PUBLIC'],
41)
42
43genrule(
44 name = 'download',
45 cmd = 'buck build $(buck audit classpath --dot :eclipse_classpath' +
46 '| egrep \'^ "//lib/\''+
47 '| cut -d\\" -f2' +
48 '| sort | uniq)',
49 srcs = [],
50 deps = [],
51 out = '__fake.download__',
52)
53
54genrule(
55 name = 'eclipse',
56 cmd = '',
57 srcs = [],
58 deps = [
59 ':_eclipse_project',
60 ':_eclipse_classpath',
61 ],
62 out = 'eclipse',
63)
64
65genrule(
66 name = 'eclipse_project',
67 cmd = '',
68 srcs = [],
69 deps = [
70 ':_eclipse_project',
71 ':_eclipse_classpath_nocompile',
72 ],
73 out = 'eclipse',
74)
75
76java_library(
77 name = 'eclipse_classpath',
78 deps = LIBS + PGMLIBS + [
79 '//gerrit-acceptance-tests:acceptance_tests',
80 '//gerrit-gwtdebug:gwtdebug',
81 '//gerrit-gwtui:ui_module',
82 '//gerrit-httpd:httpd_tests',
83 '//gerrit-main:main_lib',
84 '//gerrit-server:server__compile',
85 '//lib/prolog:compiler_lib',
86 ] + scan_plugins(),
87)
88
89genrule(
90 name = '_eclipse_project',
91 cmd = '${//tools:eclipse_project} $OUT',
92 srcs = [],
93 deps = ['//tools:eclipse_project'],
94 out = 'eclipse_project',
95)
96
97genrule(
98 name = '_eclipse_classpath',
99 cmd = '${//tools:eclipse_classpath} $OUT $DEPS',
100 srcs = [],
101 deps = [
102 ':eclipse_classpath',
103 '//tools:eclipse_classpath',
104 ],
105 out = 'eclipse_classpath',
106)
107
108genrule(
109 name = '_eclipse_classpath_nocompile',
110 cmd = '${//tools:eclipse_classpath}',
111 srcs = [],
112 deps = ['//tools:eclipse_classpath'],
113 out = '_eclipse_classpath_nocompile',
114)