Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specifying desired packages for Gradle Javadoc task

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

like image 885
jonatzin Avatar asked Dec 05 '13 14:12

jonatzin


1 Answers

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.

like image 61
roomsg Avatar answered Nov 17 '22 07:11

roomsg