Specifying desired packages for Javadoc task


(John Zinger) #1

Hi,

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


(Benjamin Muschko) #2

You can achieve that with the help of the include method on Javadoc. The following example shows how to reconfigure the standard Javadoc task provided by the Java plugin:

javadoc {
    include 'com/company/*'
}

(John Zinger) #3

Hi Benjamin,

Thanks for the reply. The packages names in ant are “com.foo1.foo2” and the likes.

Should the appropriate names in gradle be the same?

Thanks, Jonathan