1da31b3520
gwt-dev dependencies were moved from external constant to maven_jar() exported_deps dependency in I54df92daf. As the consequence, maven_jar makes from it java_library instead of prebuil_jar. As the consequence java_library without sources and resources doesn't expose output jar. This broke java_doc() rule in gwtui-api that makes use of $(location) macro. This macros is failing on libraries without own output jar. To rectify it, expose intermediate prebuilt_jar from maven_jar() rule with the same visibility scope as the final artifact. Now it can be used in java_doc() as it exposes output jar and exported_deps aren't needed in this context. Change-Id: I6168fda0aba8827063958f80c6e2828b0a6941f8
76 lines
1.6 KiB
Python
76 lines
1.6 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-extension-api:client-lib',
|
|
'//gerrit-gwtui-common:client-lib',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_library(
|
|
name = 'gwtui-api-lib',
|
|
exported_deps = [':gwtui-api-lib2'],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_library(
|
|
name = 'gwtui-api-lib2',
|
|
srcs = SRCS,
|
|
resources = glob(['src/main/**/*']),
|
|
exported_deps = [
|
|
'//gerrit-extension-api:client-lib',
|
|
'//gerrit-gwtexpui:Clippy',
|
|
'//gerrit-gwtexpui:GlobalKey',
|
|
'//gerrit-gwtexpui:SafeHtml',
|
|
'//gerrit-gwtexpui:UserAgent',
|
|
'//gerrit-gwtui-common:client-lib2',
|
|
],
|
|
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/gwt:dev__jar',
|
|
'//gerrit-gwtui-common:client-lib2',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
do_it_wrong = True,
|
|
)
|