gerrit/BUCK
Shawn Pearce 11d27c8ee8 Update Buck
Latest version of buck is faster than the prior version used by
Gerrit.  No-op updates when loading a debug version of the UI now take
only 1.804s on my laptop (previously 7s) and a draft UI compile is
only 24.659s (previously 39s).

The slow acceptance tests must now be excluded with `--exclude slow`.
Buck changed the meaning of the -e option to be --emulator, which is
unfortunately useful only for Android application developers.

genrule() now needs to use $(exe) to reference the binary to run,
offers $(location) to make it easier to find files in the build tree.

The empty srcs array is no longer required for genrule().  Buck has
determined it is sufficiently powerful with $(location) and deps that
requiring srcs is unnecessary.

Supporting .src.zip files in the srcs array of java_library() means
Gerrit no longer needs to run a separate genrule() to extract files
produced by ANTLR, or call javac inside of the BuckPrologCompiler
support glue.

Change-Id: Ib03042921a081b867a7aad0423bd45523e42917a
2013-07-26 18:11:51 -07:00

78 lines
1.6 KiB
Python

include_defs('//tools/build.defs')
gerrit_war(name = 'gerrit')
gerrit_war(name = 'chrome', ui = 'ui_chrome')
gerrit_war(name = 'firefox', ui = 'ui_firefox')
gerrit_war(name = 'withdocs', context = DOCS)
gerrit_war(name = 'release', context = DOCS + ['//plugins:core.zip'])
API_DEPS = [
':extension-api',
':extension-api-src',
':plugin-api',
':plugin-api-src',
]
genrule(
name = 'api',
cmd = '',
deps = API_DEPS,
out = '__fake.api__',
)
maven_install(deps = API_DEPS)
maven_deploy(deps = API_DEPS)
java_binary(name = 'extension-api', deps = [':extension-lib'])
java_library(
name = 'extension-lib',
deps = [
'//gerrit-extension-api:api',
'//lib/guice:guice',
'//lib/guice:guice-servlet',
'//lib:servlet-api-3_0',
],
export_deps = True,
visibility = ['PUBLIC'],
)
genrule(
name = 'extension-api-src',
cmd = 'ln -s $(location //gerrit-extension-api:api-src) $OUT',
deps = ['//gerrit-extension-api:api-src'],
out = 'extension-api-src.jar',
)
PLUGIN_API = [
'//gerrit-server:server',
'//gerrit-sshd:sshd',
'//gerrit-httpd:httpd',
]
java_binary(name = 'plugin-api', deps = [':plugin-lib'])
java_library(
name = 'plugin-lib',
deps = PLUGIN_API,
export_deps = True,
visibility = ['PUBLIC'],
)
java_binary(
name = 'plugin-api-src',
deps = [
'//gerrit-extension-api:api-src',
] + [d + '-src' for d in PLUGIN_API],
)
genrule(
name = 'download',
cmd = '$(exe //tools:download_all)',
deps = ['//tools:download_all'],
out = '__fake.download__',
)
genrule(
name = 'download_sources',
cmd = '$(exe //tools:download_all) --src',
deps = ['//tools:download_all'],
out = '__fake.download__',
)