In Maven:
According to the docs, you should add the javadoc
plugin:
<project>
...
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<configuration>
...
</configuration>
</plugin>
</plugins>
...
</reporting>
...
</project>
And then run mvn site
.
In Gradle:
According to the docs, you should add a task of type Javadoc
and then add the output of this task to a configuration
or a publication
:
apply plugin: 'java'
task myJavadocs(type: Javadoc) {
source = sourceSets.main.allJava
}
You can find complete examples of Gradle projects that publish to Bintray's JCenter at Bintray's examples project on GitHub.