Gradle Javadoc task without warnings

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.


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)

Need Your Help

Using legacy COM component in C# multithreaded Environment

c# .net multithreading com legacy

I have legacy COM component, and my mission is to write web service that wrap the COM and enable concurrent non-blocking calls.

How to define a RequireJS module that consists only of a script tag?

javascript c# requirejs

I'm trying to define a RequireJS module that consists only of a script tag - how do I do this? Although it may not be pertinent, the reason I'm trying to do this is I want to share a constants file