Specifying desired packages for Gradle Javadoc task

蹲街弑〆低调 提交于 2021-01-27 04:40:30

问题


I'm trying to convert an ant build file to Gradle and I was wondering if there exists a way to specify which packages should be in the javadoc in the same way 'packagenames' works in ant?

Thanks Jonathan


回答1:


See the 'includes'/'excludes' properties, or related methods. The patterns use the same syntax as ant.

javadoc {
    exclude "**/internal/**"
}

As another example, if the build process generates Java source files into a build directory, the Javadocs can be generated using:

javadoc {
  source = "$buildDir/"
  include( "**/*.java" )
}

This ensures that only .java files are parsed. Note that the parentheses are optional.



来源:https://stackoverflow.com/questions/20401982/specifying-desired-packages-for-gradle-javadoc-task

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!