Skip to content

Commit

Permalink
add javadoc and source code as jar generator.
Browse files Browse the repository at this point in the history
  • Loading branch information
bkhezry committed Nov 7, 2018
1 parent 1ee1a4e commit fbda042
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions library/build.gradle
Expand Up @@ -42,3 +42,26 @@ dependencies {
implementation 'com.google.maps.android:android-maps-utils:0.5+'
testImplementation'junit:junit:4.12'
}
// 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
}

0 comments on commit fbda042

Please sign in to comment.