Skip to content

Instantly share code, notes, and snippets.

@darylteo
Last active December 1, 2016 14:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save darylteo/8051600 to your computer and use it in GitHub Desktop.
Save darylteo/8051600 to your computer and use it in GitHub Desktop.
Add external sources to javadoc.
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
compile group: 'net.spy', name:'spymemcached', version: '2.10.3'
}
javadoc {
def sources = configurations.create '__depSources'
dependencies {
__depSources group: 'net.spy', name:'spymemcached', version: '2.10.3', classifier: 'sources'
}
def jars = configurations.depSources.files
jars
.collect({ jar -> project.zipTree(jar).matching({ include '**/*.java'}) })
.each { files ->
source += files
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment