Bazel: Allow to specify additional external links for Javadocs
Change-Id: Icb9f7ce751460a7817d73ad1d77a73e9a0a61580
This commit is contained in:
committed by
David Ostrovsky
parent
dce95ae8a9
commit
fb705488ae
@@ -26,6 +26,7 @@ def _impl(ctx):
|
||||
transitive_jar_paths = [j.path for j in transitive_jar_set]
|
||||
dir = ctx.outputs.zip.path + ".dir"
|
||||
source = ctx.outputs.zip.path + ".source"
|
||||
external_docs = ["http://docs.oracle.com/javase/8/docs/api"] + ctx.attr.external_docs
|
||||
cmd = [
|
||||
"rm -rf %s" % source,
|
||||
"mkdir %s" % source,
|
||||
@@ -41,7 +42,7 @@ def _impl(ctx):
|
||||
"-notimestamp",
|
||||
"-quiet",
|
||||
"-windowtitle '%s'" % ctx.attr.title,
|
||||
"-link", "http://docs.oracle.com/javase/8/docs/api",
|
||||
" ".join(['-link %s' % url for url in external_docs]),
|
||||
"-sourcepath %s" % source,
|
||||
"-subpackages ",
|
||||
":".join(ctx.attr.pkgs),
|
||||
@@ -61,6 +62,7 @@ java_doc = rule(
|
||||
"libs": attr.label_list(allow_files = False),
|
||||
"pkgs": attr.string_list(),
|
||||
"title": attr.string(),
|
||||
"external_docs": attr.string_list(),
|
||||
"_javadoc": attr.label(
|
||||
default = Label("@local_jdk//:bin/javadoc"),
|
||||
single_file = True,
|
||||
|
||||
Reference in New Issue
Block a user