1ae0210ab4
Since bottom-up to top-down graph traversal switch in Buck, only first order dependencies are built per default. This leads to a problem when gerrit is built without --deep option (per default). Move gwt-dev dependencies to gwt_binary() rules. The correct fix for this issue would be to model the GWT compiler as a tool, and ensure that its transitive deps are added as first order deps of the gwt_binary() rules: [1]. Put this workaround for now in tree and fix build breakages. We can always improve things when Buck supports that new model. Test plan: * buck clean * change one of GWT classes * buck build //gerrit-gwtui:ui_opt * buck build api_install [1] https://github.com/facebook/buck/issues/469 Change-Id: I4212ac327acd27f33256c1ba1e86c0b098e07a93
69 lines
1.6 KiB
Python
69 lines
1.6 KiB
Python
include_defs('//gerrit-gwtui/gwt.defs')
|
|
include_defs('//tools/gwt-constants.defs')
|
|
|
|
DEPS = GWT_TRANSITIVE_DEPS + [
|
|
'//gerrit-gwtexpui:CSS',
|
|
'//lib:gwtjsonrpc',
|
|
'//lib/gwt:dev',
|
|
]
|
|
|
|
gwt_genrule(MODULE, DEPS)
|
|
gwt_genrule(MODULE, DEPS, '_r')
|
|
|
|
gwt_user_agent_permutations(
|
|
name = 'ui',
|
|
module_name = 'gerrit_ui',
|
|
modules = [MODULE],
|
|
module_deps = [':ui_module'],
|
|
deps = DEPS,
|
|
visibility = ['//:'],
|
|
)
|
|
|
|
gwt_module(
|
|
name = 'ui_module',
|
|
srcs = glob(['src/main/java/**/*.java']),
|
|
gwt_xml = 'src/main/java/%s.gwt.xml' % MODULE.replace('.', '/'),
|
|
resources = glob(['src/main/java/**/*']),
|
|
deps = [
|
|
':freebie_application_icon_set',
|
|
'//gerrit-gwtui-common:diffy_logo',
|
|
'//gerrit-gwtui-common:client',
|
|
'//gerrit-gwtexpui:CSS',
|
|
'//lib/codemirror:codemirror',
|
|
'//lib/gwt:user',
|
|
],
|
|
visibility = [
|
|
'//tools/eclipse:classpath',
|
|
'//Documentation:licenses.txt',
|
|
'//Documentation:js_licenses.txt',
|
|
],
|
|
)
|
|
|
|
java_library(
|
|
name = 'freebie_application_icon_set',
|
|
deps = [
|
|
'//lib:LICENSE-freebie_application_icon_set',
|
|
'//lib:LICENSE-CC-BY3.0',
|
|
],
|
|
)
|
|
|
|
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',
|
|
],
|
|
source_under_test = [':ui_module'],
|
|
vm_args = ['-Xmx512m'],
|
|
visibility = ['//tools/eclipse:classpath'],
|
|
)
|