Do "doc-files" work with gradle javadoc?

(Bair) #1

I have been trying to get the images we use for some of our javadocs to work with our gradle build, but so far no luck. The normal pattern is to put any javadoc specific files that are not meant to be transformed into the doc-files folder in each associated package that has doc files. Then the javadocs you write use a relative path such as “”. However none of my doc-files are being picked up when I run the javadoc tool.

Are doc-files supported in gradle?

(Bair) #2

To get the desired behavior I am manually copying the files over. For convenience I split the doc files out of src/main/java into src/main/docs, and then:

javadoc {
        doLast {
            copy {
                from "src/main/docs"
                into "$buildDir/docs/javadoc"

(Peter Niederwieser) #3

I think the reason why “doc-files” doesn’t work is that Gradle passes individual (Java) file names to the ‘javadoc’ tool, rather than package names.