
Move the definitions of GUAVA_VERSION and GUAVA_DOC_URL into a separate .bzl file, and add GUAVA_BIN_SHA1. Modify the existing GUAVA_VERSION file to include the new .bzl file. This allows to reuse the same values in both the buck and bazel builds, and when we update Guava we only need to modify one file. Update the bazel build of the extension API to include the Guava Javadoc URL in the javadoc rule. Change-Id: I7895ceb761d609d79d3b80a271e6bd7425c17e2b
59 lines
1.3 KiB
Python
59 lines
1.3 KiB
Python
load('//lib:guava.bzl', 'GUAVA_DOC_URL')
|
|
load('//lib/jgit:jgit.bzl', 'JGIT_DOC_URL')
|
|
load('//tools/bzl:gwt.bzl', 'gwt_module')
|
|
|
|
SRC = 'src/main/java/com/google/gerrit/extensions/'
|
|
SRCS = glob([SRC + '**/*.java'])
|
|
|
|
EXT_API_SRCS = glob([SRC + 'client/*.java'])
|
|
|
|
gwt_module(
|
|
name = 'client',
|
|
srcs = EXT_API_SRCS,
|
|
gwt_xml = SRC + 'Extensions.gwt.xml',
|
|
visibility = ['//visibility:public'],
|
|
)
|
|
|
|
java_binary(
|
|
name = 'extension-api',
|
|
main_class = 'Dummy',
|
|
runtime_deps = [':lib'],
|
|
visibility = ['//visibility:public'],
|
|
)
|
|
|
|
java_library(
|
|
name = 'lib',
|
|
exports = [
|
|
':api',
|
|
'//lib:guava',
|
|
'//lib/guice:guice',
|
|
'//lib/guice:guice-assistedinject',
|
|
'//lib/guice:guice-servlet',
|
|
'//lib:servlet-api-3_1',
|
|
],
|
|
visibility = ['//visibility:public'],
|
|
)
|
|
|
|
#TODO(davido): There is no provided_deps argument to java_library rule
|
|
java_library(
|
|
name = 'api',
|
|
srcs = glob([SRC + '**/*.java']),
|
|
deps = [
|
|
'//gerrit-common:annotations',
|
|
'//lib:guava',
|
|
'//lib/guice:guice',
|
|
'//lib/guice:guice-assistedinject',
|
|
],
|
|
visibility = ['//visibility:public'],
|
|
)
|
|
|
|
load('//tools/bzl:javadoc.bzl', 'java_doc')
|
|
|
|
java_doc(
|
|
name = 'extension-api-javadoc',
|
|
title = 'Gerrit Review Extension API Documentation',
|
|
libs = [':api'],
|
|
pkgs = ['com.google.gerrit.extensions'],
|
|
external_docs = [JGIT_DOC_URL, GUAVA_DOC_URL],
|
|
)
|