aboutsummaryrefslogtreecommitdiff
path: root/library/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'library/build.gradle')
-rw-r--r--library/build.gradle25
1 files changed, 25 insertions, 0 deletions
diff --git a/library/build.gradle b/library/build.gradle
index 44f22cf..e5d29ba 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -1,5 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
+apply plugin: 'com.github.dcendents.android-maven'
android {
compileSdkVersion Integer.parseInt(project.TARGET_SDK)
@@ -61,4 +62,28 @@ dependencies {
compile "com.jakewharton:butterknife:${BUTTERKNIFE}"
annotationProcessor "com.jakewharton:butterknife-compiler:${BUTTERKNIFE}"
+}
+
+// build a jar with source files
+task sourcesJar(type: Jar) {
+ from android.sourceSets.main.java.srcDirs
+ classifier = 'sources'
+}
+
+task javadoc(type: Javadoc) {
+ failOnError false
+ source = android.sourceSets.main.java.sourceFiles
+ classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
+ classpath += configurations.compile
+}
+
+// build a jar with javadoc
+task javadocJar(type: Jar, dependsOn: javadoc) {
+ classifier = 'javadoc'
+ from javadoc.destinationDir
+}
+
+artifacts {
+ archives sourcesJar
+ archives javadocJar
} \ No newline at end of file