mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-04 14:44:43 +02:00
Compare commits
1 Commits
build/mast
...
docs/v6/up
Author | SHA1 | Date | |
---|---|---|---|
395ab3ad0b |
@ -18,7 +18,7 @@ plugins {
|
|||||||
idea
|
idea
|
||||||
}
|
}
|
||||||
|
|
||||||
version = "6.8.2-SNAPSHOT"
|
version = "6.8.1-SNAPSHOT"
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = "com.plotsquared"
|
group = "com.plotsquared"
|
||||||
@ -66,6 +66,7 @@ subprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val javadocDir = rootDir.resolve("docs").resolve("javadoc").resolve(project.name)
|
||||||
allprojects {
|
allprojects {
|
||||||
dependencies {
|
dependencies {
|
||||||
// Tests
|
// Tests
|
||||||
@ -171,6 +172,11 @@ allprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
|
named<Delete>("clean") {
|
||||||
|
doFirst {
|
||||||
|
javadocDir.deleteRecursively()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
options.compilerArgs.addAll(arrayOf("-Xmaxerrs", "1000"))
|
options.compilerArgs.addAll(arrayOf("-Xmaxerrs", "1000"))
|
||||||
@ -181,6 +187,16 @@ allprojects {
|
|||||||
options.encoding = "UTF-8"
|
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 {
|
shadowJar {
|
||||||
this.archiveClassifier.set(null as String?)
|
this.archiveClassifier.set(null as String?)
|
||||||
this.archiveFileName.set("${project.name}-${project.version}.${this.archiveExtension.getOrElse("jar")}")
|
this.archiveFileName.set("${project.name}-${project.version}.${this.archiveExtension.getOrElse("jar")}")
|
||||||
@ -205,3 +221,37 @@ 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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user