Gradle Javadoc task without warnings
android, gradle, java, javadoc, maven
Solution
roman-mazur answered the question in another issue at Github.
There is currently a discussion going on, whether it's the right way. But for the moment adding these lines solved my issue:
afterEvaluate {
javadocs.classpath += files(android.plugin.runtimeJarList)
}
Problem
I generate a javadoc .jar file with Gradle for my Android project. I'm using a similar setup like in this instruction. But I'm getting a lot of warnings that many symbols are missing. I noticed that the javadoc task doesn't find any of my dependencies. How can I add my dependencies to javadoc task's classpath? Here is my upload task: ``` afterEvaluate { project -> uploadArchives { //... } //... task androidJavadocs(type: Javadoc) { source = android.sourceSets.main.allJava } task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { classifier = 'javadoc' from androidJavadocs.destinationDir } //... artifacts { archives androidSourcesJar archives androidJavadocsJar } } ``` There is also filed bug, but I'd like to have a solution now.