forked from Hithomelabs/CFTunnels
Hithomelabs/CFTunnels#115: Add javadoc generation task
This commit is contained in:
parent
042c706407
commit
949aacfa60
26
build.gradle
26
build.gradle
@ -60,3 +60,29 @@ dependencies {
|
|||||||
tasks.named('test') {
|
tasks.named('test') {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Javadoc generation task.
|
||||||
|
* Generates API documentation for all public APIs.
|
||||||
|
*/
|
||||||
|
javadoc {
|
||||||
|
source = sourceSets.main.allJava
|
||||||
|
classpath = configurations.compileClasspath
|
||||||
|
destinationDir = file("${buildDir}/docs/javadoc")
|
||||||
|
options.author = true
|
||||||
|
options.links = [
|
||||||
|
"https://docs.oracle.com/javase/17/docs/api/"
|
||||||
|
]
|
||||||
|
// Allow javadoc to fail without stopping the build in CI
|
||||||
|
failOnError false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verify javadoc generation completes without errors
|
||||||
|
tasks.register('verifyJavadoc') {
|
||||||
|
dependsOn javadoc
|
||||||
|
description = 'Verifies javadoc generation completes without errors'
|
||||||
|
group = 'verification'
|
||||||
|
doLast {
|
||||||
|
println "Javadoc generated successfully at: ${javadoc.destinationDir}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user