File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -63,13 +63,30 @@ afterEvaluate { project ->
6363 }
6464 }
6565
66+ task androidJavadocs(type : Javadoc ) {
67+ onlyIf { gradle. taskGraph. hasTask(" uploadArchives" ) }
68+ source = android. sourceSets. main. java. sourceFiles
69+ destinationDir = rootProject. file(" docs/javadoc" )
70+ classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
71+ classpath + = configurations. compile
72+ classpath + = configurations. javadocs
73+ options. noTimestamp = true
74+ options. links = [' https://developer.android.com/reference/' ]
75+ }
76+
77+ task androidJavadocsJar(type : Jar , dependsOn : androidJavadocs) {
78+ classifier = ' javadoc'
79+ from androidJavadocs. destinationDir
80+ }
81+
6682 task androidSourcesJar(type : Jar ) {
6783 classifier = ' sources'
6884 from android. sourceSets. main. java. sourceFiles
6985 }
7086
7187 artifacts {
7288 archives androidSourcesJar
89+ archives androidJavadocsJar
7390 }
7491
7592}
You can’t perform that action at this time.
0 commit comments