Buck: Expose extension client sources to plugin API
The extension package exposes some sources to the client. Make them available to the plugins as well. To use, the plugin only needs to inherit the new Extensions GWT module: <inherits name="com.google.gerrit.extensions.Extensions"/> Given that the class files and javadocs for exposed sources are already contained in the gerrit-plugin artifact, we don't expose them again in the plugin-gwtui artifact. Change-Id: I4b98ee470614a5eab1bd96cc7801895336851cc1
This commit is contained in:
parent
19267674f7
commit
9e218ae090
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user