Skip to content

Commit 32ae491

Browse files
feat: implement Xdoclint and html5 options since those are set by Gradle and can't get switched off
Signed-off-by: manticore-projects <andreas@manticore-projects.com>
1 parent e44ede9 commit 32ae491

File tree

4 files changed

+46
-10
lines changed

4 files changed

+46
-10
lines changed

build.gradle

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -290,15 +290,17 @@ tasks.register('xmldoc', Javadoc) {
290290
dependsOn(jar)
291291
source = sourceSets.main.allJava
292292
classpath = sourceSets.main.runtimeClasspath
293-
294293
// beware: Gradle deletes this folder automatically and there is no switch-off
295294
destinationDir = reporting.file("xmlDoclet")
296-
options.docletpath = configurations.xmlDoclet.files.asType(List)
297-
options.doclet = "com.manticore.tools.xmldoclet.XmlDoclet"
298295
title = "API $version"
299-
options.addBooleanOption("rst", true)
300-
options.addBooleanOption("withFloatingToc", true)
301-
options.addStringOption("basePackage", "com.manticore.tools.xmldoclet")
296+
297+
options {
298+
docletpath = configurations.xmlDoclet.files.asType(List)
299+
doclet = "com.manticore.tools.xmldoclet.XmlDoclet"
300+
addBooleanOption("rst", true)
301+
addBooleanOption("withFloatingToc", true)
302+
addStringOption("basePackage", "com.manticore.tools.xmldoclet")
303+
}
302304

303305
doLast {
304306
copy {

src/main/java/com/manticore/tools/xmldoclet/Parser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ String getJavaDoc(final Element element) {
8181

8282
// Fix issue #12: Remove commas that are added around HTML tags and entities
8383
// Pattern: comma followed by < or & or > or ;
84-
commentText = commentText.replaceAll(",(<|&|>|;)", "$1");
84+
commentText = commentText.replaceAll(",([<&>;])", "$1");
8585
// Pattern: < or & or > or ; followed by comma
86-
commentText = commentText.replaceAll("(<|&|>|;),", "$1");
86+
commentText = commentText.replaceAll("([<&>;]),", "$1");
8787

8888
return commentText;
8989
}

src/main/java/com/manticore/tools/xmldoclet/SupportedOptions.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ final class SupportedOptions {
1616
/**
1717
* A Map where the key is an option name and the value is the argument value
1818
* (considering each argument has at most one value).
19-
* It stores all sucessfuly parsed options given to the Doclet in the command line.
19+
* It stores all successfully parsed options given to the Doclet in the command line.
2020
*/
2121
private final Map<String, String> givenCliOptionsMap = new HashMap<>();
2222

@@ -39,7 +39,16 @@ public SupportedOptions() {
3939
newOneArgOption("doctitle", "Document Title\n"),
4040
newOneArgOption("windowtitle", "Window Title\n"),
4141
newNoArgOption("noTimestamp", "No Timestamp.\n"),
42-
newNoArgOption("withFloatingToc", "Renders a Floating TOC on the right side.\n"));
42+
newNoArgOption("withFloatingToc", "Renders a Floating TOC on the right side.\n"),
43+
44+
// Compatibility to standard JavaDoc options since there is no apparent way to filter/remove
45+
newNoArgOption("Xdoclint:none", "Compatibility only, will be ignored.\n"),
46+
newNoArgOption("Xdoclint:all", "Compatibility only, will be ignored.\n"),
47+
newNoArgOption("Xdoclint:html", "Compatibility only, will be ignored.\n"),
48+
newNoArgOption("Xdoclint:syntax", "Compatibility only, will be ignored.\n"),
49+
newNoArgOption("Xdoclint:reference", "Compatibility only, will be ignored.\n"),
50+
newNoArgOption("Xdoclint:missing", "Compatibility only, will be ignored.\n"),
51+
newNoArgOption("html5", "Compatibility only, will be ignored.\n"));
4352
}
4453

4554
public Set<CustomOption> get() {

src/site/sphinx/changelog.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22

33
Changelog of xml-doclet.
44

5+
## 2.0.8 (2025-07-12)
6+
7+
### Other changes
8+
9+
10+
## 2.0.7 (2025-07-12)
11+
12+
### Other changes
13+
14+
15+
## 2.0.6 (2025-07-12)
16+
17+
### Other changes
18+
19+
20+
## 2.0.5 (2025-07-12)
21+
22+
### Other changes
23+
24+
25+
## 2.0.4 (2025-07-12)
26+
27+
### Other changes
28+
29+
530
## 2.0.3 (2025-03-03)
631

732
### Bug Fixes

0 commit comments

Comments
 (0)