Skip to content

Commit 085e8c7

Browse files
committed
Build JavaDocs and Sources
1 parent 65039b9 commit 085e8c7

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

library/build.gradle

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,26 @@ dependencies {
2626
compile 'com.android.support:support-annotations:23.1.1'
2727
compile 'com.github.afollestad:bridge:1.6.4@aar'
2828
}
29+
30+
// build a jar with source files
31+
task sourcesJar(type: Jar) {
32+
from android.sourceSets.main.java.srcDirs
33+
classifier = 'sources'
34+
}
35+
36+
task javadoc(type: Javadoc) {
37+
failOnError false
38+
source = android.sourceSets.main.java.sourceFiles
39+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
40+
}
41+
42+
// build a jar with javadoc
43+
task javadocJar(type: Jar, dependsOn: javadoc) {
44+
classifier = 'javadoc'
45+
from javadoc.getDestinationDir()
46+
}
47+
48+
artifacts {
49+
archives sourcesJar
50+
archives javadocJar
51+
}

0 commit comments

Comments
 (0)