Skip to content

Commit

Permalink
#402 Upload javadoc to maven
Browse files Browse the repository at this point in the history
  • Loading branch information
davemorrissey committed Mar 14, 2018
1 parent 759e50d commit dcb152f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,30 @@ afterEvaluate { project ->
}
}

task androidJavadocs(type: Javadoc) {
onlyIf { gradle.taskGraph.hasTask("uploadArchives") }
source = android.sourceSets.main.java.sourceFiles
destinationDir = rootProject.file("docs/javadoc")
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.compile
classpath += configurations.javadocs
options.noTimestamp = true
options.links = ['https://developer.android.com/reference/']
}

task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
classifier = 'javadoc'
from androidJavadocs.destinationDir
}

task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.sourceFiles
}

artifacts {
archives androidSourcesJar
archives androidJavadocsJar
}

}

0 comments on commit dcb152f

Please sign in to comment.