From e1e1cdc5e0276994df10150b8a924c52de3439e6 Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Sun, 15 Nov 2015 16:53:28 -0500 Subject: [PATCH] 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 --- .buckconfig | 1 + BUCK | 9 +++++---- tools/build.defs | 13 +++++++------ 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.buckconfig b/.buckconfig index 51318f3d63..38fcc58356 100644 --- a/.buckconfig +++ b/.buckconfig @@ -9,6 +9,7 @@ firefox = //:firefox gerrit = //:gerrit headless = //:headless + polygerrit = //:polygerrit release = //:release safari = //:safari soyc = //gerrit-gwtui:ui_soyc diff --git a/BUCK b/BUCK index c9868743d3..2c545e3497 100644 --- a/BUCK +++ b/BUCK @@ -1,10 +1,11 @@ include_defs('//tools/build.defs') gerrit_war(name = 'gerrit') -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 = '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:']) diff --git a/tools/build.defs b/tools/build.defs index e475bbd67c..526be1eb66 100644 --- a/tools/build.defs +++ b/tools/build.defs @@ -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, )