Smart and useful code for building projects with Gradle.
Note: tested with jitpack.io - visit /javadoc to see the docs on jitpack
Add the following to your build.gradle:
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
}Add the following to your build.gradle:
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}