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.
Asked
Active
Viewed 433 times
1

leventov
- 14,760
- 11
- 69
- 98
1 Answers
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