gerrit/gerrit-extension-api/BUCK
Alice Kober-Sotzek bc8186ad79 Add unit tests for Comment.Range#isValid
In order to use the RangeSubject within gerrit-extension-api as well
as gerrit-acceptance-tests, a new Bazel/Buck package is introduced.
The purpose of this package is to bundle test helper classes which are
shared by different packages.

Change-Id: I59aa42d89c06f4de60a2a05d41a72653eba268de
2016-12-08 11:21:48 +01:00

90 lines
1.8 KiB
Python

include_defs('//lib/JGIT_VERSION')
include_defs('//lib/GUAVA_VERSION')
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 = ['PUBLIC'],
)
java_library(
name = 'client-lib',
srcs = EXT_API_SRCS,
resources = EXT_API_SRCS + glob([SRC + 'Extensions.gwt.xml']),
visibility = ['PUBLIC'],
)
java_binary(
name = 'extension-api',
deps = [':lib'],
visibility = ['PUBLIC'],
)
java_library(
name = 'lib',
exported_deps = [
':api',
'//lib:guava',
'//lib/guice:guice',
'//lib/guice:guice-assistedinject',
'//lib/guice:guice-servlet',
'//lib:servlet-api-3_1',
],
visibility = ['PUBLIC'],
)
java_library(
name = 'api',
srcs = glob([SRC + '**/*.java']),
deps = [
'//gerrit-common:annotations',
],
provided_deps = [
'//lib:guava',
'//lib/guice:guice',
'//lib/guice:guice-assistedinject',
],
visibility = ['PUBLIC'],
)
java_sources(
name = 'extension-api-src',
srcs = SRCS,
visibility = ['PUBLIC'],
)
java_test(
name = 'api_tests',
srcs = glob(['src/test/java/**/*Test.java']),
deps = [
':api',
'//gerrit-test-util:test_util',
'//lib:truth',
'//lib/guice:guice',
],
)
java_doc(
name = 'extension-api-javadoc',
title = 'Gerrit Review Extension API Documentation',
pkgs = ['com.google.gerrit.extensions'],
source_jar = ':extension-api-src',
srcs = SRCS,
deps = [
'//lib:guava',
'//lib/guice:javax-inject',
'//lib/guice:guice_library',
'//lib/guice:guice-assistedinject',
'//lib/jgit/org.eclipse.jgit:jgit',
'//gerrit-common:annotations',
],
visibility = ['PUBLIC'],
external_docs = [JGIT_DOC_URL, GUAVA_DOC_URL],
)