Commit a84aca31 authored by Aaron Coburn's avatar Aaron Coburn
Browse files

Add task for apidocs generation

parent fd5c7da6
......@@ -269,15 +269,37 @@ subprojects { subproj ->
afterReleaseBuild.dependsOn publish
}
// Ignore alpha, beta, milestone and release candidates
dependencyUpdates.resolutionStrategy = {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'm'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject("Release Candidate")
configure(rootProject) {
task apidocs(type: Javadoc, dependsOn: getTasksByName('docs', true)) {
outputs.upToDateWhen { false }
destinationDir = new File(projectDir, "docs/${version}")
title = "Amherst College Repository Extension Services"
options {
links "http://docs.oracle.com/javase/8/docs/api/"
links "http://camel.apache.org/maven/current/camel-core/apidocs/"
links "http://marmotta.apache.org/apidocs/"
links "https://jena.apache.org/documentation/javadoc/jena/"
}
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
source subprojects.collect {project -> project.sourceSets.main.allJava }
classpath = files(subprojects.collect {project -> project.sourceSets.main.compileClasspath})
}
// Ignore alpha, beta, milestone and release candidates
dependencyUpdates.resolutionStrategy = {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'm'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject("Release Candidate")
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment