Skip to content

Commit

Permalink
Do not customize javadoc output anymore - It complicates build, had t…
Browse files Browse the repository at this point in the history
…o be reviewed for new javadoc versions, and almost nobody uses the javadoc HTML-s nowadays.
  • Loading branch information
ddekany committed Dec 9, 2023
1 parent dd08c78 commit 177115e
Showing 1 changed file with 1 addition and 71 deletions.
72 changes: 1 addition & 71 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@
<!-- Generate docs -->
<!-- ================================================================= -->

<target name="_rawJavadoc" depends="compile">
<target name="javadoc" depends="compile" description="Build the JavaDocs">
<mkdir dir="build/api" />
<delete includeEmptyDirs="yes">
<fileset dir="build/api" includes="**/*" />
Expand Down Expand Up @@ -464,76 +464,6 @@
<delete dir="build/javadoc-sources" />
</target>

<target name="javadoc" depends="_rawJavadoc, _fixJDK8JavadocCSS" description="Build the JavaDocs" />

<target name="_fixJDK8JavadocCSS" depends="_rawJavadoc" if="atLeastJDK8">
<property name="file" value="build/api/stylesheet.css" />

<available file="${file}" property="stylesheet.available"/>
<fail unless="stylesheet.available">CSS file not found: ${file}</fail>
<echo>Fixing JDK 8 CSS in ${file}</echo>

<!-- Tell that it's modified: -->
<replaceregexp
file="${file}" flags="gs" encoding="utf-8"
match="/\* (Javadoc style sheet) \*/" replace="/\* \1 - JDK 8 usability fix regexp substitutions applied \*/"
/>

<!-- Remove broken link: -->
<replaceregexp
file="${file}" flags="gs" encoding="utf-8"
match="@import url\('resources/fonts/dejavu.css'\);\s*" replace=""
/>

<!-- Font family fixes: -->
<replaceregexp
file="${file}" flags="gsi" encoding="utf-8"
match="['&quot;]DejaVu Sans['&quot;]" replace="Arial"
/>
<replaceregexp
file="${file}" flags="gsi" encoding="utf-8"
match="['&quot;]DejaVu Sans Mono['&quot;]" replace="'Courier New'"
/>
<replaceregexp
file="${file}" flags="gsi" encoding="utf-8"
match="['&quot;]DejaVu Serif['&quot;]" replace="Arial"
/>
<replaceregexp
file="${file}" flags="gsi" encoding="utf-8"
match="(?&lt;=[\s,:])serif\b" replace="sans-serif"
/>
<replaceregexp
file="${file}" flags="gsi" encoding="utf-8"
match="(?&lt;=[\s,:])Georgia,\s*" replace=""
/>
<replaceregexp
file="${file}" flags="gsi" encoding="utf-8"
match="['&quot;]Times New Roman['&quot;],\s*" replace=""
/>
<replaceregexp
file="${file}" flags="gsi" encoding="utf-8"
match="(?&lt;=[\s,:])Times,\s*" replace=""
/>
<replaceregexp
file="${file}" flags="gsi" encoding="utf-8"
match="(?&lt;=[\s,:])Arial\s*,\s*Arial\b" replace="Arial"
/>

<!-- "Parameters:", "Returns:", "Throws:", "Since:", "See also:" etc. fixes: -->
<property name="ddSelectorStart" value="(?:\.contentContainer\s+\.(?:details|description)|\.serializedFormContainer)\s+dl\s+dd\b.*?\{[^\}]*\b" />
<property name="ddPropertyEnd" value="\b.+?;" />
<!-- - Put back description (dd) indentation: -->
<replaceregexp
file="${file}" flags="gs" encoding="utf-8"
match="(${ddSelectorStart})margin${ddPropertyEnd}" replace="\1margin: 5px 0 10px 20px;"
/>
<!-- - No monospace font for the description (dd) part: -->
<replaceregexp
file="${file}" flags="gs" encoding="utf-8"
match="(${ddSelectorStart})font-family${ddPropertyEnd}" replace="\1"
/>
</target>

<!-- ====================== -->
<!-- Manual -->
<!-- ====================== -->
Expand Down

0 comments on commit 177115e

Please sign in to comment.