Gradle Android Javadoc Plugin

Gradle plugin that generates Java Documentation from an Android Gradle project.

License

License

Categories

Categories

Gradle Build Tools
GroupId

GroupId

com.vanniktech
ArtifactId

ArtifactId

gradle-android-javadoc-plugin
Last Version

Last Version

0.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

Gradle Android Javadoc Plugin
Gradle plugin that generates Java Documentation from an Android Gradle project.
Project URL

Project URL

http://github.com/vanniktech/gradle-android-javadoc-plugin/
Source Code Management

Source Code Management

http://github.com/vanniktech/gradle-android-javadoc-plugin/

Download gradle-android-javadoc-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/com.vanniktech/gradle-android-javadoc-plugin/ -->
<dependency>
    <groupId>com.vanniktech</groupId>
    <artifactId>gradle-android-javadoc-plugin</artifactId>
    <version>0.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.vanniktech/gradle-android-javadoc-plugin/
implementation 'com.vanniktech:gradle-android-javadoc-plugin:0.3.0'
// https://jarcasting.com/artifacts/com.vanniktech/gradle-android-javadoc-plugin/
implementation ("com.vanniktech:gradle-android-javadoc-plugin:0.3.0")
'com.vanniktech:gradle-android-javadoc-plugin:jar:0.3.0'
<dependency org="com.vanniktech" name="gradle-android-javadoc-plugin" rev="0.3.0">
  <artifact name="gradle-android-javadoc-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.vanniktech', module='gradle-android-javadoc-plugin', version='0.3.0')
)
libraryDependencies += "com.vanniktech" % "gradle-android-javadoc-plugin" % "0.3.0"
[com.vanniktech/gradle-android-javadoc-plugin "0.3.0"]

Dependencies

test (2)

Group / Artifact Type Version
com.android.tools.build : gradle jar 3.1.3
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

gradle-android-javadoc-plugin

Gradle plugin that generates Java Documentation from an Android Gradle project.

Set up

app/build.gradle or library/build.gradle

buildscript {
  repositories {
    mavenCentral()
  }
  dependencies {
    classpath "com.vanniktech:gradle-android-javadoc-plugin:0.3.0"
  }
}

apply plugin: "com.vanniktech.android.javadoc"

Information: This plugin is also available on Gradle plugins

Snapshot

buildscript {
  repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
  }
  dependencies {
    classpath "com.vanniktech:gradle-android-javadoc-plugin:0.4.0-SNAPSHOT"
  }
}

apply plugin: "com.vanniktech.android.javadoc"

Get Javadoc

./gradlew generateDebugJavadoc
./gradlew generateReleaseJavadoc

or to run javadoc task for all variants :

./gradlew generateJavadoc

HTML reports

<subproject>/build/docs/javadoc/debug/index.html
<subproject>/build/docs/javadoc/release/index.html

Get Javadoc archive

./gradlew generateDebugJavadocJar
./gradlew generateReleaseJavadocJar

or to run javadoc archive task for all variants :

./gradlew generateJavadocJar

Customize Plugin

androidJavadoc {
  // variantFilter takes a closure that received an Android variant as parameter.
  // Return true to generate javadoc task for this variant, false to do nothing
  // This is the default closure :
  variantFilter { variant ->
    if (variant) {
      return true
    } else {
      return false
    }
  }

  // taskNameTransformer takes a closure to customise the task name.
  // Task name pattern is "generate${taskNameTransformer(variant).capitalize()}Javadoc"
  // This is the default implementation :
  taskNameTransformer { variant ->
    variant.name
  }

  // outputDir return the documentation output dir
  // Default implementation :
  outputDir = { Project project ->
    "${project.buildDir}/docs/javadoc/"
  }
}

License

Copyright (C) 2015 Vanniktech - Niklas Baudy

Licensed under the Apache License, Version 2.0

Versions

Version
0.3.0
0.2.1