Skip to content

Commit c53667f

Browse files
feat: Write API documentation to the WebSite via XMLDoclet
1 parent decf662 commit c53667f

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

build.gradle

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,25 @@ javadoc {
133133

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

141141
// @see https://github.com/gradle/gradle/issues/11898#issue-549900869
142-
title = null
143-
options.noTimestamp(false)
142+
//title = null
143+
//options.noTimestamp(false)
144+
145+
options.addBooleanOption("rst", true)
146+
options.addStringOption("basePackage", "net.sf.jsqlparser")
147+
148+
dependsOn(compileJava)
149+
doLast {
150+
copy {
151+
from reporting.file("xmlDoclet/javadoc.rst")
152+
into "${projectDir}/src/site/sphinx/"
153+
}
154+
}
144155
}
145156

146157
test {
@@ -399,7 +410,7 @@ task updateKeywords(type: JavaExec) {
399410
}
400411

401412
task sphinx(type: Exec) {
402-
dependsOn(gitChangelogTask, renderRR, updateKeywords)
413+
dependsOn(gitChangelogTask, renderRR, updateKeywords, xmldoc)
403414

404415
doFirst() {
405416
exec {

src/site/sphinx/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Java SQL Parser Library
1111
syntax
1212
keywords
1313
changelog
14+
javadoc
1415

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

0 commit comments

Comments
 (0)