How to configure classpath for javadoc task?

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

   // or maybe this 
   classpath = configurations.foo
}