Merge changes I4b98ee47,I46947452
* changes: Buck: Expose extension client sources to plugin API Buck: Fix building GWT plugins
This commit is contained in:
commit
6f560ffbdd
@ -1,23 +1,34 @@
|
||||
SRC = 'src/main/java/com/google/gerrit/extensions/'
|
||||
SRCS = glob([SRC + '**/*.java'])
|
||||
|
||||
# TODO(davido): align this rule with package boundaries.
|
||||
# This would probably affect quite some plugins, though.
|
||||
CLIENT_SRCS = [SRC + n for n in [
|
||||
'api/projects/ProjectState.java',
|
||||
'common/ChangeStatus.java',
|
||||
'common/Comment.java',
|
||||
'common/InheritableBoolean.java',
|
||||
'common/ListChangesOption.java',
|
||||
'common/Side.java',
|
||||
'common/SubmitType.java',
|
||||
'common/Theme.java',
|
||||
'webui/GerritTopMenu.java',
|
||||
]]
|
||||
|
||||
gwt_module(
|
||||
name = 'client',
|
||||
srcs = glob([
|
||||
SRC + 'api/projects/ProjectState.java',
|
||||
SRC + 'common/ChangeStatus.java',
|
||||
SRC + 'common/Comment.java',
|
||||
SRC + 'common/InheritableBoolean.java',
|
||||
SRC + 'common/ListChangesOption.java',
|
||||
SRC + 'common/Side.java',
|
||||
SRC + 'common/SubmitType.java',
|
||||
SRC + 'common/Theme.java',
|
||||
SRC + 'webui/GerritTopMenu.java',
|
||||
]),
|
||||
srcs = glob(CLIENT_SRCS),
|
||||
gwt_xml = SRC + 'Extensions.gwt.xml',
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
||||
java_library(
|
||||
name = 'client-lib',
|
||||
srcs = glob(CLIENT_SRCS),
|
||||
resources = glob(CLIENT_SRCS + [SRC + 'Extensions.gwt.xml']),
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = 'extension-api',
|
||||
deps = [':lib'],
|
||||
|
@ -12,6 +12,7 @@ java_binary(
|
||||
name = 'gwtui-api',
|
||||
deps = [
|
||||
':gwtui-api-lib',
|
||||
'//gerrit-extension-api:client-lib',
|
||||
'//gerrit-gwtui-common:client-lib',
|
||||
],
|
||||
visibility = ['PUBLIC'],
|
||||
@ -28,6 +29,7 @@ java_library(
|
||||
srcs = SRCS,
|
||||
resources = glob(['src/main/**/*']),
|
||||
exported_deps = [
|
||||
'//gerrit-extension-api:client-lib',
|
||||
'//gerrit-gwtexpui:Clippy',
|
||||
'//gerrit-gwtexpui:GlobalKey',
|
||||
'//gerrit-gwtexpui:SafeHtml',
|
||||
|
@ -127,20 +127,29 @@ def gerrit_plugin(
|
||||
srcs = mf_src,
|
||||
out = 'MANIFEST.MF',
|
||||
)
|
||||
gwt_deps = []
|
||||
static_jars = []
|
||||
if gwt_module:
|
||||
gwt_deps = GWT_PLUGIN_DEPS
|
||||
static_jars = [':%s-static-jar' % name]
|
||||
java_library(
|
||||
name = name + '__plugin',
|
||||
srcs = srcs,
|
||||
resources = resources,
|
||||
deps = deps,
|
||||
provided_deps = ['//gerrit-%s-api:lib' % type] + provided_deps + gwt_deps,
|
||||
provided_deps = ['//gerrit-%s-api:lib' % type] +
|
||||
provided_deps +
|
||||
GWT_PLUGIN_DEPS,
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
if gwt_module:
|
||||
java_library(
|
||||
name = name + '__gwt_module',
|
||||
srcs = [],
|
||||
resources = list(set(srcs + resources)),
|
||||
deps = deps,
|
||||
provided_deps = ['//lib/gwt:dev'] +
|
||||
GWT_PLUGIN_DEPS,
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
prebuilt_jar(
|
||||
name = '%s-static-jar' % name,
|
||||
binary_jar = ':%s-static' % name,
|
||||
@ -157,8 +166,8 @@ def gerrit_plugin(
|
||||
gwt_binary(
|
||||
name = name + '__gwt_application',
|
||||
modules = [gwt_module],
|
||||
deps = gwt_deps,
|
||||
module_deps = [':%s__plugin' % name],
|
||||
deps = GWT_PLUGIN_DEPS,
|
||||
module_deps = [':%s__gwt_module' % name],
|
||||
local_workers = cpu_count(),
|
||||
strict = True,
|
||||
experimental_args = GWT_COMPILER_ARGS,
|
||||
|
Loading…
Reference in New Issue
Block a user