Add polygerrit.war target to build only PolyGerrit UI

Developers working on the PolyGerrit UI shouldn't have to wait an
extra 30-60s to build the GWT UI into the binary.

Change-Id: If2958a9b09d9a998cf2ab00b0ee60e62d8dee564
This commit is contained in:
Dave Borowitz 2015-11-15 16:53:28 -05:00
parent fd1a418ea2
commit e1e1cdc5e0
3 changed files with 13 additions and 10 deletions

View File

@ -9,6 +9,7 @@
firefox = //:firefox
gerrit = //:gerrit
headless = //:headless
polygerrit = //:polygerrit
release = //:release
safari = //:safari
soyc = //gerrit-gwtui:ui_soyc

1
BUCK
View File

@ -5,6 +5,7 @@ gerrit_war(name = 'headless', ui = None)
gerrit_war(name = 'chrome', ui = 'ui_chrome')
gerrit_war(name = 'firefox', ui = 'ui_firefox')
gerrit_war(name = 'safari', ui = 'ui_safari')
gerrit_war(name = 'polygerrit', ui = 'polygerrit')
gerrit_war(name = 'withdocs', docs = True)
gerrit_war(name = 'release', ui = 'ui_optdbg_r', docs = True, context = ['//plugins:core'], visibility = ['//tools/maven:'])

View File

@ -61,18 +61,19 @@ def war(
)
def gerrit_war(name, ui = 'ui_optdbg', context = [], docs = False, visibility = []):
ui_deps = []
if ui:
ui_deps.append('//polygerrit-ui/app:polygerrit_ui')
if ui != 'polygerrit':
ui_deps.append('//gerrit-gwtui:%s' % ui)
war(
name = name,
libs = LIBS + ['//gerrit-war:version'],
pgmlibs = PGMLIBS,
context = [
context = ui_deps + context + [
'//gerrit-main:main_bin',
'//gerrit-war:webapp_assets',
] + ([
'//gerrit-gwtui:' + ui,
'//polygerrit-ui/app:polygerrit_ui',
] if ui else []) +
context,
],
docs = docs,
visibility = visibility,
)