Documentor is a Gradle Plugin to generate Javadocs for Android Code.
- Add the following lines to your root build.gradle (Latest Release):
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.thomaspaulmann:Documentor:X.Y'
}
}
- Reference the plugin from your module's build.gradle:
apply plugin: 'com.thomaspaulmann.documentor'
- Now you're good to go and should have some tasks in the
documentor
gradle group calleddocumentDebug
,documentRelease
anddeleteDocs
. Run one of the tasks and enjoy your beautiful Javadocs. 🐱
$ gradle clean build documentDebug
Note: The plugin is also available as an official Gradle Plugin.
Documentor gives you the possibility to exclude specific files. To ignore a specific path, reference the documentor
extension in your module's build.gradle and add your files to the excludes
option:
documentor {
excludes = ["**/ExcludeActivity.java"]
}
It's also possible to exclude complete paths or multiple files. Simply separate them with a comma:
documentor {
excludes = ["**/exclude/**", "**/ExcludeActivity.java"]
}
Furthermore, you can specify the ouptut directory (relative to your project directory) of your generated javadocs:
documentor {
outputDir = "${project.projectDir}/javadoc"
}
I attached a sample gradle file for better understanding. Furthermore, I provide you an Example Android Project to see Documentor in action.