From c53667f8eff30e3799bb3866810124de6cd4221b Mon Sep 17 00:00:00 2001 From: Andreas Reichel Date: Sun, 14 May 2023 20:02:19 +0700 Subject: [PATCH] feat: Write API documentation to the WebSite via XMLDoclet --- build.gradle | 19 +++++++++++++++---- src/site/sphinx/index.rst | 1 + 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 3dd11950e..6ca891a20 100644 --- a/build.gradle +++ b/build.gradle @@ -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 { @@ -399,7 +410,7 @@ task updateKeywords(type: JavaExec) { } task sphinx(type: Exec) { - dependsOn(gitChangelogTask, renderRR, updateKeywords) + dependsOn(gitChangelogTask, renderRR, updateKeywords, xmldoc) doFirst() { exec { diff --git a/src/site/sphinx/index.rst b/src/site/sphinx/index.rst index a20944280..d0986132b 100644 --- a/src/site/sphinx/index.rst +++ b/src/site/sphinx/index.rst @@ -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