5d683cc593
Instead of the change ID pass the ChangeInfo object to extension panels of the change screen. This makes all change data available to the plugin UI code and the plugin doesn't need to load the change data once more if it is needed. To make this work the ChangeInfo class must be in a package that is both visible to the Gerrit client and the plugins. This is why ChangeInfo and all *Info classes that are imported into ChangeInfo are moved to gerrit-gwtui-common. ChangeInfo also uses classes from: - //lib:gwtjsonrpc - //lib:gwtorm_client - //gerrit-common:client - //gerrit-reviewdb:client This is why these dependencies are added to gerrit-gwtui-common. They are exported by gerrit-plugin-gwtui so that they are available to GWT plugins. Change-Id: I52d6c5cd68e3c05c66a6d68c2cef10a1df54948f Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
76 lines
1.6 KiB
Python
76 lines
1.6 KiB
Python
SRC = 'src/main/java/com/google/gerrit/'
|
|
|
|
ANNOTATIONS = [
|
|
SRC + 'common/Nullable.java',
|
|
SRC + 'common/audit/Audit.java',
|
|
SRC + 'common/auth/SignInRequired.java',
|
|
]
|
|
|
|
EXCLUDES = [
|
|
SRC + 'common/SiteLibraryLoaderUtil.java',
|
|
SRC + 'common/PluginData.java',
|
|
SRC + 'common/FileUtil.java',
|
|
SRC + 'common/IoUtil.java',
|
|
SRC + 'common/TimeUtil.java',
|
|
]
|
|
|
|
java_library(
|
|
name = 'annotations',
|
|
srcs = ANNOTATIONS,
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
gwt_module(
|
|
name = 'client',
|
|
srcs = glob([SRC + 'common/**/*.java'], excludes = EXCLUDES),
|
|
gwt_xml = SRC + 'Common.gwt.xml',
|
|
exported_deps = [
|
|
'//gerrit-extension-api:client',
|
|
'//gerrit-prettify:client',
|
|
'//lib:gwtorm_client',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_library(
|
|
name = 'server',
|
|
srcs = glob([SRC + 'common/**/*.java'], excludes = ANNOTATIONS),
|
|
deps = [
|
|
':annotations',
|
|
'//gerrit-extension-api:api',
|
|
'//gerrit-patch-jgit:server',
|
|
'//gerrit-prettify:server',
|
|
'//gerrit-reviewdb:server',
|
|
'//lib:gwtjsonrpc',
|
|
'//lib:gwtorm',
|
|
'//lib:guava',
|
|
'//lib/jgit:jgit',
|
|
'//lib/joda:joda-time',
|
|
'//lib/log:api',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
TEST = 'src/test/java/com/google/gerrit/common/'
|
|
AUTO_VALUE_TEST_SRCS = [TEST + 'AutoValueTest.java']
|
|
|
|
java_test(
|
|
name = 'client_tests',
|
|
srcs = glob(['src/test/java/**/*.java'], excludes = AUTO_VALUE_TEST_SRCS),
|
|
deps = [
|
|
':client',
|
|
'//lib:guava',
|
|
'//lib:junit',
|
|
],
|
|
source_under_test = [':client'],
|
|
)
|
|
|
|
java_test(
|
|
name = 'auto_value_tests',
|
|
srcs = AUTO_VALUE_TEST_SRCS,
|
|
deps = [
|
|
'//lib:truth',
|
|
'//lib/auto:auto-value',
|
|
],
|
|
)
|