Commit 035686e5 by tonihei Committed by Oliver Woodman

Fix Javadoc generation.

Accessing task providers (like javaCompileProvider) at sync time is not
possible. That's why the source sets of all generateJavadoc tasks is empty.

The set of source directories can also be accessed directly through the static
sourceSets field. Combining these allows to statically provide the relevant
source files to the javadoc task without needing to access the run-time task
provider.

PiperOrigin-RevId: 247938176
parent 48de1010
Showing with 4 additions and 1 deletions
......@@ -18,10 +18,13 @@ android.libraryVariants.all { variant ->
if (!name.equals("release")) {
return; // Skip non-release builds.
}
def allSourceDirs = variant.sourceSets.inject ([]) {
acc, val -> acc << val.javaDirectories
}
task("generateJavadoc", type: Javadoc) {
description = "Generates Javadoc for the ${javadocTitle}."
title = "ExoPlayer ${javadocTitle}"
source = variant.javaCompileProvider.get().source
source = allSourceDirs
options {
links "http://docs.oracle.com/javase/7/docs/api/"
linksOffline "https://developer.android.com/reference",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment