Add support for generating limited local javadocs based on our dependency graph
This commit is contained in:
parent
0c2663c9ff
commit
5c89a50ab3
35
build.gradle
35
build.gradle
|
@ -28,13 +28,17 @@ repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
configurations {
|
||||||
compile 'org.codehaus.groovy:groovy-all:[2.4.7,2.5.0)'
|
localJavadocs
|
||||||
compile "io.dropwizard:dropwizard-core:${dropwizardVersion}"
|
}
|
||||||
compile "io.dropwizard:dropwizard-views-mustache:${dropwizardVersion}"
|
|
||||||
|
|
||||||
testCompile "io.dropwizard:dropwizard-testing:${dropwizardVersion}"
|
dependencies {
|
||||||
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
|
compile withSource('org.codehaus.groovy:groovy-all:[2.4.7,2.5.0)')
|
||||||
|
compile withSource("io.dropwizard:dropwizard-core:${dropwizardVersion}")
|
||||||
|
compile withSource("io.dropwizard:dropwizard-views-mustache:${dropwizardVersion}")
|
||||||
|
|
||||||
|
testCompile withSource("io.dropwizard:dropwizard-testing:${dropwizardVersion}")
|
||||||
|
testCompile withSource('org.spockframework:spock-core:1.0-groovy-2.4')
|
||||||
}
|
}
|
||||||
|
|
||||||
task generateExampleYaml {
|
task generateExampleYaml {
|
||||||
|
@ -63,3 +67,22 @@ test {
|
||||||
events "passed", "skipped", "failed", "standardOut", "standardError"
|
events "passed", "skipped", "failed", "standardOut", "standardError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def withSource(String dependency) {
|
||||||
|
configurations.localJavadocs.dependencies.add(dependencies.create("${dependency}:sources"))
|
||||||
|
return dependency
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
task localdoc(type: Javadoc) {
|
||||||
|
group 'Documentation'
|
||||||
|
description 'Generate javadoc for the dependencies of the project'
|
||||||
|
destinationDir = file("${buildDir}/generated-docs")
|
||||||
|
|
||||||
|
source = configurations.localJavadocs.files.collect { sourceArtifact ->
|
||||||
|
zipTree(sourceArtifact).findAll { it.name.endsWith('java') }
|
||||||
|
}
|
||||||
|
title 'Generated Docs'
|
||||||
|
failOnError false
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue