Skip to content

Commit

Permalink
feat: Write API documentation to the WebSite via XMLDoclet
Browse files Browse the repository at this point in the history
  • Loading branch information
manticore-projects committed May 14, 2023
1 parent decf662 commit c53667f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
19 changes: 15 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,25 @@ javadoc {

tasks.register('xmldoc', Javadoc) {
source = sourceSets.main.allJava
// beware: Gradle deletes this folder automatically and there is no switch-off
destinationDir = reporting.file("xmlDoclet")
options.docletpath = configurations.xmlDoclet.files.asType(List)
options.doclet = "com.github.markusbernhardt.xmldoclet.XmlDoclet"
//options.addBooleanOption("Xdoclint:none", true)

// @see https://github.com/gradle/gradle/issues/11898#issue-549900869
title = null
options.noTimestamp(false)
//title = null
//options.noTimestamp(false)

options.addBooleanOption("rst", true)
options.addStringOption("basePackage", "net.sf.jsqlparser")

dependsOn(compileJava)
doLast {
copy {
from reporting.file("xmlDoclet/javadoc.rst")
into "${projectDir}/src/site/sphinx/"
}
}
}

test {
Expand Down Expand Up @@ -399,7 +410,7 @@ task updateKeywords(type: JavaExec) {
}

task sphinx(type: Exec) {
dependsOn(gitChangelogTask, renderRR, updateKeywords)
dependsOn(gitChangelogTask, renderRR, updateKeywords, xmldoc)

doFirst() {
exec {
Expand Down
1 change: 1 addition & 0 deletions src/site/sphinx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Java SQL Parser Library
syntax
keywords
changelog
javadoc

.. image:: https://maven-badges.herokuapp.com/maven-central/com.github.jsqlparser/jsqlparser/badge.svg
:alt: Maven Repo
Expand Down

0 comments on commit c53667f

Please sign in to comment.