ec387625e7
Change-Id: Ia3de0458603dbe14f510b2edadf6ea44406b820e
39 lines
852 B
Plaintext
39 lines
852 B
Plaintext
def java_doc(
|
|
name,
|
|
title,
|
|
pkgs,
|
|
paths,
|
|
srcs = [],
|
|
deps = [],
|
|
visibility = [],
|
|
do_it_wrong = False,
|
|
):
|
|
if do_it_wrong:
|
|
sourcepath = paths
|
|
else:
|
|
sourcepath = ['$SRCDIR/' + n for n in paths]
|
|
genrule(
|
|
name = name,
|
|
cmd = ' '.join([
|
|
'while ! test -f .buckconfig; do cd ..; done;',
|
|
'javadoc',
|
|
'-quiet',
|
|
'-protected',
|
|
'-encoding UTF-8',
|
|
'-charset UTF-8',
|
|
'-notimestamp',
|
|
'-windowtitle "' + title + '"',
|
|
'-link http://docs.oracle.com/javase/7/docs/api',
|
|
'-subpackages ',
|
|
':'.join(pkgs),
|
|
'-sourcepath ',
|
|
':'.join(sourcepath),
|
|
' -classpath ',
|
|
':'.join(['$(location %s)' % n for n in deps]),
|
|
'-d $TMP',
|
|
]) + ';jar cf $OUT -C $TMP .',
|
|
srcs = srcs,
|
|
out = name + '.jar',
|
|
visibility = visibility,
|
|
)
|