diff --git a/tools/javadoc/javadoc.bzl b/tools/javadoc/javadoc.bzl index 1575cb6..41c85cd 100644 --- a/tools/javadoc/javadoc.bzl +++ b/tools/javadoc/javadoc.bzl @@ -24,7 +24,13 @@ def _android_jar(android_api_level): def _javadoc_library(ctx): _check_non_empty(ctx.attr.root_packages, "root_packages") - transitive_deps = [dep.java.transitive_deps for dep in ctx.attr.deps] + transitive_deps = [] + for dep in ctx.attr.deps: + if JavaInfo in dep: + transitive_deps.append(dep[JavaInfo].transitive_deps) + elif hasattr(dep, "java"): + transitive_deps.append(dep.java.transitive_deps) + if ctx.attr._android_jar: transitive_deps.append(ctx.attr._android_jar.files)