Add javadoc to repo-publishing

This commit is contained in:
Lukas Rieger (Blue) 2024-06-18 01:40:42 +02:00
parent f9415468bf
commit 5ddf614026
No known key found for this signature in database
GPG Key ID: AA33883B1BBA03E6
2 changed files with 33 additions and 3 deletions

View File

@ -18,6 +18,7 @@ java {
sourceCompatibility = JavaVersion.toVersion(javaTarget)
targetCompatibility = JavaVersion.toVersion(javaTarget)
withSourcesJar()
withJavadocJar()
}
repositories {
@ -50,6 +51,20 @@ spotless {
}
}
tasks.javadoc {
options {
(this as? StandardJavadocDocletOptions)?.apply {
links(
"https://docs.oracle.com/en/java/javase/16/docs/api/",
"https://javadoc.io/doc/com.flowpowered/flow-math/1.0.3/",
"https://javadoc.io/doc/com.google.code.gson/gson/2.8.0/",
)
addStringOption("Xdoclint:none", "-quiet")
addBooleanOption("html5", true)
}
}
}
node {
version.set("20.14.0")
download.set(true)

View File

@ -39,9 +39,9 @@ val commits = "git rev-list --count $lastTag..HEAD".runCommand()
println("Git hash: $gitHash" + if (clean) "" else " (dirty)")
group = "de.bluecolored.bluemap"
version = lastVersion //+
//(if (commits == "0") "" else "-$commits") +
//(if (clean) "" else "-dirty")
version = lastVersion +
(if (commits == "0") "" else "-$commits") +
(if (clean) "" else "-dirty")
System.setProperty("bluemap.version", version.toString())
System.setProperty("bluemap.lastVersion", lastVersion)
@ -52,6 +52,7 @@ java {
sourceCompatibility = JavaVersion.toVersion(javaTarget)
targetCompatibility = JavaVersion.toVersion(javaTarget)
withSourcesJar()
withJavadocJar()
}
repositories {
@ -92,6 +93,20 @@ spotless {
}
}
tasks.javadoc {
options {
(this as? StandardJavadocDocletOptions)?.apply {
links(
"https://docs.oracle.com/en/java/javase/16/docs/api/",
"https://javadoc.io/doc/com.flowpowered/flow-math/1.0.3/",
"https://javadoc.io/doc/com.google.code.gson/gson/2.8.0/",
)
addStringOption("Xdoclint:none", "-quiet")
addBooleanOption("html5", true)
}
}
}
tasks.withType(JavaCompile::class).configureEach {
options.apply {
encoding = "utf-8"