mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-28 02:11:40 +00:00
Publish API docs (#1094)
Redirects I want eventually ( @Bankst ) demo.photonvision.org redirected to https://photonvision.github.io/photonvision/built-client/ javadocs.photonvision.org redirected to https://photonvision.github.io/photonvision/built-docs/javadoc/ cppdocs.photonvision.org redirected to https://photonvision.github.io/photonvision/built-docs/doxygen/html/ For now this runs on all commits to master. Once we confirm it works, let's pull back to only tagged releases --------- Co-authored-by: Mohammad Durrani <46766905+mdurrani808@users.noreply.github.com> Co-authored-by: Chris <chrisgerth010592@gmail.com>
This commit is contained in:
@@ -74,6 +74,34 @@ tasks.register('generateJavaDocs', Javadoc) {
|
||||
source = sourceSets.main.allJava
|
||||
classpath = sourceSets.main.compileClasspath
|
||||
destinationDir = file("${projectDir}/build/docs")
|
||||
|
||||
options.addBooleanOption("Xdoclint:html,missing,reference,syntax", true)
|
||||
options.addBooleanOption('html5', true)
|
||||
|
||||
if (JavaVersion.current().isJava8Compatible() && project.hasProperty('docWarningsAsErrors')) {
|
||||
// Treat javadoc warnings as errors.
|
||||
//
|
||||
// The second argument '-quiet' is a hack. The one parameter
|
||||
// addStringOption() doesn't work, so we add '-quiet', which is added
|
||||
// anyway by gradle. See https://github.com/gradle/gradle/issues/2354.
|
||||
//
|
||||
// See JDK-8200363 (https://bugs.openjdk.java.net/browse/JDK-8200363)
|
||||
// for information about the nonstandard -Xwerror option. JDK 15+ has
|
||||
// -Werror.
|
||||
options.addStringOption('Xwerror', '-quiet')
|
||||
}
|
||||
|
||||
if (JavaVersion.current().isJava11Compatible()) {
|
||||
if (!JavaVersion.current().isJava12Compatible()) {
|
||||
options.addBooleanOption('-no-module-directories', true)
|
||||
}
|
||||
doLast {
|
||||
// This is a work-around for https://bugs.openjdk.java.net/browse/JDK-8211194. Can be removed once that issue is fixed on JDK's side
|
||||
// Since JDK 11, package-list is missing from javadoc output files and superseded by element-list file, but a lot of external tools still need it
|
||||
// Here we generate this file manually
|
||||
new File(destinationDir, 'package-list').text = new File(destinationDir, 'element-list').text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jacoco {
|
||||
|
||||
Reference in New Issue
Block a user