Skip to content

Instantly share code, notes, and snippets.

@jboyens
Created April 14, 2011 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jboyens/919801 to your computer and use it in GitHub Desktop.
Save jboyens/919801 to your computer and use it in GitHub Desktop.
task sourcesJar(type: Jar, dependsOn:classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn:javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives(sourcesJar) {
type = 'source'
}
archives(javadocJar) {
type = 'javadoc'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment