mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 12:46:46 +01:00
Remove aggregation of cross module javadocs (#3646)
chore: Don't aggregate javadocs anymore
This commit is contained in:
parent
48386c0828
commit
713c4ad0d2
@ -66,7 +66,6 @@ subprojects {
|
||||
}
|
||||
}
|
||||
|
||||
val javadocDir = rootDir.resolve("docs").resolve("javadoc").resolve(project.name)
|
||||
allprojects {
|
||||
dependencies {
|
||||
// Tests
|
||||
@ -172,11 +171,6 @@ allprojects {
|
||||
}
|
||||
|
||||
tasks {
|
||||
named<Delete>("clean") {
|
||||
doFirst {
|
||||
javadocDir.deleteRecursively()
|
||||
}
|
||||
}
|
||||
|
||||
compileJava {
|
||||
options.compilerArgs.addAll(arrayOf("-Xmaxerrs", "1000"))
|
||||
@ -187,16 +181,6 @@ allprojects {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
javadoc {
|
||||
val opt = options as StandardJavadocDocletOptions
|
||||
opt.addStringOption("Xdoclint:none", "-quiet")
|
||||
opt.tags(
|
||||
"apiNote:a:API Note:",
|
||||
"implSpec:a:Implementation Requirements:",
|
||||
"implNote:a:Implementation Note:"
|
||||
)
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
this.archiveClassifier.set(null as String?)
|
||||
this.archiveFileName.set("${project.name}-${project.version}.${this.archiveExtension.getOrElse("jar")}")
|
||||
@ -221,37 +205,3 @@ nexusPublishing {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
val aggregatedJavadocs = create<Javadoc>("aggregatedJavadocs") {
|
||||
title = "${project.name} ${project.version} API"
|
||||
setDestinationDir(javadocDir)
|
||||
options.destinationDirectory = javadocDir
|
||||
|
||||
doFirst {
|
||||
javadocDir.deleteRecursively()
|
||||
}
|
||||
}.also {
|
||||
it.group = "Documentation"
|
||||
it.description = "Generate javadocs from all child projects as if it was a single project"
|
||||
}
|
||||
|
||||
subprojects.forEach { subProject ->
|
||||
subProject.afterEvaluate {
|
||||
subProject.tasks.withType<Javadoc>().forEach { task ->
|
||||
aggregatedJavadocs.source += task.source
|
||||
aggregatedJavadocs.classpath += task.classpath
|
||||
aggregatedJavadocs.excludes += task.excludes
|
||||
aggregatedJavadocs.includes += task.includes
|
||||
|
||||
val rootOptions = aggregatedJavadocs.options as StandardJavadocDocletOptions
|
||||
val subOptions = task.options as StandardJavadocDocletOptions
|
||||
rootOptions.links(*subOptions.links.orEmpty().minus(rootOptions.links.orEmpty().toSet()).toTypedArray())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
build {
|
||||
dependsOn(aggregatedJavadocs)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user