Created
April 7, 2014 22:03
-
-
Save burntcookie90/10066136 to your computer and use it in GitHub Desktop.
Javadoc Gradle Task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android.libraryVariants.all { variant -> | |
task("${variant.name}Javadoc", type: Javadoc) { | |
title = "$name $version API" | |
description "Generates Javadoc for $variant.name." | |
source = variant.javaCompile.source | |
ext.androidJar = | |
"${android.plugin.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar" | |
classpath = files(variant.javaCompile.classpath.files) + files(ext.androidJar) | |
options.links("http://docs.oracle.com/javase/7/docs/api/"); | |
options.linksOffline("http://d.android.com/reference/", " file:///${android.plugin.sdkDirectory}/docs/reference"); | |
options.stylesheetFile = new File(projectDir, "stylesheet.css"); | |
exclude '**/BuildConfig.java' | |
exclude '**/R.java' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment