Files
gerrit/tools/java_doc.defs
David Pursehouse a60cca779d Merge branch 'stable-2.13'
* stable-2.13:
  Metrics: Add missing Javadoc
  Lifecycle{Manager,Module}: Add missing Javadoc
  EventDispatcher: Add missing description on @throws javadoc
  {ExtendedHttp,Http,Rpc}AuditEvent: Add missing @param javadoc tags
  Fix formatting of links in Changes Submitted Together documentation
  Fix usage of OutgoingEmailValidator to make sure TLD override works
  Fix references to Guava classes from extension API Javadoc
  GarbageCollectorListener: Replace direct link to external class
  Prepare to render JGit references as links in api documentation
  Allow to provide URLs for docs of external classes
  Write each Lucene index using a dedicated background thread
  Do not allow index futures to be cancelled

Change-Id: I9bc732562efa903ff201be86d9fb8ac2226ed8e5
2016-09-09 22:08:42 +09:00

38 lines
996 B
Plaintext

def java_doc(
name,
title,
pkgs,
source_jar,
srcs = [],
deps = [],
visibility = [],
external_docs = [],
):
# TODO(davido): Actually we shouldn't need to extract the source
# archive, javadoc should just work with provided archive.
external_docs.insert(0, 'http://docs.oracle.com/javase/7/docs/api')
genrule(
name = name,
cmd = ' '.join([
'mkdir $TMP/sourcepath &&',
'unzip $(location %s) -d $TMP/sourcepath &&' % source_jar,
'javadoc',
'-quiet',
'-protected',
'-encoding UTF-8',
'-charset UTF-8',
'-notimestamp',
'-windowtitle "' + title + '"',
' '.join(['-link %s' % url for url in external_docs]),
'-subpackages ',
':'.join(pkgs),
'-sourcepath $TMP/sourcepath',
' -classpath ',
':'.join(['$(classpath %s)' % n for n in deps]),
'-d $TMP',
]) + ';jar cf $OUT -C $TMP .',
srcs = srcs,
out = name + '.jar',
visibility = visibility,
)