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
66 lines
1.4 KiB
Python
66 lines
1.4 KiB
Python
COMMON = ['gerrit-gwtui-common/src/main/java/']
|
|
GWTEXPUI = ['gerrit-gwtexpui/src/main/java/']
|
|
SRC = 'src/main/java/com/google/gerrit/'
|
|
SRCS = glob([SRC + '**/*.java'])
|
|
|
|
DEPS = ['//lib/gwt:user']
|
|
|
|
java_binary(
|
|
name = 'gwtui-api',
|
|
deps = [
|
|
':gwtui-api-lib',
|
|
'//gerrit-gwtui-common:client-lib',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_library(
|
|
name = 'gwtui-api-lib',
|
|
srcs = SRCS,
|
|
resources = glob(['src/main/**/*']),
|
|
exported_deps = ['//gerrit-gwtui-common:client-lib'],
|
|
provided_deps = DEPS + ['//lib/gwt:dev'],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_binary(
|
|
name = 'gwtui-api-src',
|
|
deps = [
|
|
':gwtui-api-src-lib',
|
|
'//gerrit-gwtexpui:client-src-lib',
|
|
'//gerrit-gwtui-common:client-src-lib',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_library(
|
|
name = 'gwtui-api-src-lib',
|
|
srcs = [],
|
|
resources = glob(['src/main/**/*']),
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_doc(
|
|
name = 'gwtui-api-javadoc',
|
|
title = 'Gerrit Review GWT Extension API Documentation',
|
|
pkgs = [
|
|
'com.google.gerrit',
|
|
'com.google.gwtexpui.clippy',
|
|
'com.google.gwtexpui.globalkey',
|
|
'com.google.gwtexpui.safehtml',
|
|
'com.google.gwtexpui.user',
|
|
],
|
|
paths = COMMON + GWTEXPUI,
|
|
srcs = SRCS,
|
|
deps = DEPS + [
|
|
'//lib:gwtjsonrpc',
|
|
'//lib:gwtorm_client',
|
|
'//lib/gwt:dev',
|
|
'//gerrit-gwtui-common:client-lib',
|
|
'//gerrit-common:client',
|
|
'//gerrit-reviewdb:client',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
do_it_wrong = True,
|
|
)
|