I'm trying to prepare and upload my Android library to Bintray and part of that process runs the following javadoc task:
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
This task is part of a larger gradle script here: https://raw.githubusercontent.com/attwellBrian/JCenter/master/bintrayv1.gradle
When the javadoc
task runs, the following problems occur:
How can I correct these reference issues when generating Javadocs?
EDIT It looks like its not all Android class links that are creating an issue, it may just be classes that come from the Android support library (which is also where the annotations come from). Does something special need to be done to link to source files in gradle dependencies?
You should also add all your dependency to the javadoc.classpath. Try this:
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
afterEvaluate {
javadoc.classpath += files(android.libraryVariants.collect { variant ->
variant.javaCompileProvider.get().classpath.files
})
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With