This did produce the package link properly, but resulted in duplicate Javadocs for all of my classes, which is even worse. I couldn’t figure out how to get Gradle to stop listing all the individual source files.
It looks like this may be because gradle feeds javadoc individual files rather than packages. After I applied the fix I’m proposing on gradle-dev, the links started working for me. Does this track with what others are seeing?
Yeah, unfortunately the Gradle Javadoc task does contain a bit of private code around the part that needs to be changed, so the patch has to include some of that. Here’s the source code you can copy into your build.gradle, and then use FullProcessingJavadoc instead of Javadoc:
You can probably comment out the parts dealing with Pegdown if you’re using the standard doclet. That’s the first if block on lines 280-285, and the Files.copy call on lines 295-297
Note that I’m no longer specifying subpackages; instead the latest version just grabs package names from the files included in the SourceTask.
Also import java.nio.file.Path as JPath, and in addition to rel.parent != null, it looks like we’d also need to && sourcePath.parent.fileName as String != "doc-files" if commenting out the doc-files copy logic.
I’m having some trouble running your code under my current version of Gradle (2.5). I suppose you’re using a different version. I can’t spend any more time on this right now, but if I ever start working on the affected project again I’ll try this out. Thanks again for the help.