How to configure classpath for javadoc task?


(aleksg) #1

I’m trying to generate javadoc

task myJavadocs(type: Javadoc) {
source = sourceSets.main.allJava
destinationDir(file(“doc”))
include("**/Class1.java")
}

Gradle answered that it cannot find classes which supplied in dependendent jars. How to configure classpath to force him see classes from dependencies?
Thanks


(uklance) #2
task myJavadocs(type: Javadoc) {
    // likely this 
   classpath = sourceSets.main.runtimeClasspath 

   // or maybe this 
   classpath = configurations.foo
} 

(aleksg) #3

Thanks for helping !