1

I want my Javadoc to inherit comments from standard JDK classes. For this, I need to add JDK sources to -sourcepath javadoc option. Not to generate documentation for JDK classes themselves, I would specify packages via -packagenames or -subpackages javadoc options, but Javadoc Gradle task doesn't support them.

leventov
  • 14,760
  • 11
  • 69
  • 98

1 Answers1

0

Well, this appeared to be pretty easy

javadoc {
    configure((CoreJavadocOptions) getOptions()) {
        addStringOption('sourcepath', project.hasProperty('jdkSrc') ? jdkSrc :
            "$System.env.JAVA_HOME/src")
    }
}
leventov
  • 14,760
  • 11
  • 69
  • 98