| include_defs('//gerrit-gwtui/gwt.defs') |
| |
| genrule( |
| name = 'ui_optdbg', |
| cmd = 'cd $TMP;' + |
| 'unzip -q $SRCDIR/ui_dbg.zip;' + |
| 'mv' + |
| ' gerrit_ui/gerrit_ui.nocache.js' + |
| ' gerrit_ui/gerrit_dbg.nocache.js;' + |
| 'unzip -qo $SRCDIR/ui_opt.zip;' + |
| 'mkdir -p $(dirname $OUT);' + |
| 'zip -qr $OUT .', |
| srcs = [ |
| genfile('ui_dbg.zip'), |
| genfile('ui_opt.zip'), |
| ], |
| deps = [ |
| ':ui_dbg', |
| ':ui_opt', |
| ], |
| out = 'ui_optdbg.zip', |
| visibility = ['PUBLIC'], |
| ) |
| |
| gwt_application( |
| name = 'ui_opt', |
| module_target = MODULE, |
| compiler_opts = [ |
| '-strict', |
| '-style', 'OBF', |
| '-optimize', '9', |
| '-XdisableClassMetadata', |
| '-XdisableCastChecking', |
| ], |
| deps = APP_DEPS + [':ui_dbg'], |
| ) |
| |
| gwt_application( |
| name = 'ui_dbg', |
| module_target = MODULE, |
| compiler_opts = DEBUG_OPTS + ['-strict'], |
| deps = APP_DEPS, |
| visibility = ['//:eclipse'], |
| ) |
| |
| gwt_user_agent_permutations( |
| name = 'ui', |
| module_name = 'gerrit_ui', |
| module_target = MODULE, |
| compiler_opts = DEBUG_OPTS + ['-draftCompile'], |
| browsers = BROWSERS, |
| deps = APP_DEPS, |
| visibility = ['//:'], |
| ) |
| |
| DIFFY = glob(['src/main/java/com/google/gerrit/client/diffy*.png']) |
| |
| gwt_module( |
| name = 'ui_module', |
| srcs = glob(['src/main/java/**/*.java']), |
| gwtxml = 'src/main/java/%s.gwt.xml' % MODULE.replace('.', '/'), |
| resources = glob(['src/main/java/**/*'], excludes = DIFFY), |
| deps = [ |
| ':diffy_logo', |
| '//gerrit-gwtexpui:Clippy', |
| '//gerrit-gwtexpui:CSS', |
| '//gerrit-gwtexpui:GlobalKey', |
| '//gerrit-gwtexpui:Linker', |
| '//gerrit-gwtexpui:Progress', |
| '//gerrit-gwtexpui:SafeHtml', |
| '//gerrit-gwtexpui:UserAgent', |
| '//gerrit-common:client', |
| '//gerrit-extension-api:client', |
| '//gerrit-patch-jgit:client', |
| '//gerrit-prettify:client', |
| '//gerrit-reviewdb:client', |
| '//lib:gwtjsonrpc', |
| '//lib:gwtjsonrpc_src', |
| '//lib:gwtorm', |
| '//lib/codemirror:codemirror', |
| '//lib/gwt:user', |
| '//lib/jgit:jgit', |
| ], |
| visibility = [ |
| '//tools/eclipse:classpath', |
| '//Documentation:licenses.txt', |
| ], |
| ) |
| |
| prebuilt_jar( |
| name = 'diffy_logo', |
| binary_jar = genfile('diffy_images.jar'), |
| deps = [ |
| '//lib:LICENSE-diffy', |
| '//lib:LICENSE-CC-BY3.0', |
| ':diffy_image_files_ln', |
| ], |
| ) |
| |
| genrule( |
| name = 'diffy_image_files_ln', |
| cmd = 'ln -s $(location :diffy_image_files) $OUT', |
| deps = [':diffy_image_files'], |
| out = 'diffy_images.jar', |
| ) |
| |
| java_library( |
| name = 'diffy_image_files', |
| resources = DIFFY, |
| ) |
| |
| java_test( |
| name = 'ui_tests', |
| srcs = glob(['src/test/java/**/*.java']), |
| resources = glob(['src/test/resources/**/*']) + [ |
| 'src/main/java/com/google/gerrit/GerritGwtUI.gwt.xml', |
| ], |
| deps = [ |
| ':ui_module', |
| '//gerrit-common:client', |
| '//gerrit-extension-api:client', |
| '//lib:junit', |
| '//lib/gwt:dev', |
| '//lib/gwt:user', |
| '//lib/gwt:gwt-test-utils', |
| '//lib/jgit:jgit', |
| ], |
| source_under_test = [':ui_module'], |
| vm_args = ['-Xmx512m'], |
| visibility = ['//tools/eclipse:classpath'], |
| ) |