Skip to content

Commit 84fbd5f

Browse files
committed
Refactored build.xml then split javadoc target in two.
One target now reflects the general usage api. The other target shows all members, including protected and private.
1 parent 584f963 commit 84fbd5f

2 files changed

Lines changed: 36 additions & 23 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ MyAppName/
5050
└── build.xml # The Ant build script
5151
```
5252
## Usage Commands
53-
Open your terminal in the project root and use the following targets:
53+
Open a terminal in the project root and use the following targets:
5454

5555
| Command | Description |
5656
|-----|-----|
@@ -89,10 +89,10 @@ Every time you push code to the main branch or open a Pull Request:
8989
- The installers are saved as Artifacts in the GitHub Actions run summary for 90 days.
9090
### The Release Phase (Continuous Deployment)
9191
A formal GitHub Release is only triggered when you push a version tag.
92-
This creates a permanent download page for your users.
92+
This creates a permanent download page for users.
9393

9494
#### How to trigger a new release:
95-
To release a new version (e.g., version 1.0.1), run the following commands in your terminal:
95+
To release a new version (e.g., version 1.0.1), run the following commands in a terminal:
9696

9797
```Bash
9898
# 1. Tag the current commit

build.xml

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,31 @@
2121
</not>
2222
</condition>
2323

24+
<macrodef name="generate-javadoc">
25+
<attribute name="access-level" default="protected"/>
26+
<attribute name="output-subdir"/>
27+
<sequential>
28+
<mkdir dir="${docs.dir}/@{output-subdir}"/>
29+
<javadoc destdir="${docs.dir}/@{output-subdir}"
30+
source="1.8"
31+
encoding="UTF-8"
32+
use="true"
33+
author="true"
34+
version="true"
35+
failonerror="true"
36+
access="@{access-level}">
37+
<fileset dir="${src.dir}" includes="**/*.java"/>
38+
<link href="${javadoc.api.url}"/>
39+
<!-- Uncomment to resolve references in Javadoc comments to lib/ jars. -->
40+
<!--
41+
<classpath>
42+
<pathelement path="${build.dir}"/>
43+
<fileset dir="lib" includes="**/*.jar" erroronmissingdir="false"/>
44+
</classpath>
45+
-->
46+
</javadoc>
47+
</sequential>
48+
</macrodef>
2449

2550
<condition property="isMac">
2651
<os family="mac"/>
@@ -85,28 +110,16 @@
85110
<java jar="${jar.dir}/${app.name}.jar" fork="true"/>
86111
</target>
87112

88-
<target name="javadoc" depends="preflight" description="Generate Javadoc (works for unnamed or named packages)">
89-
<mkdir dir="${docs.dir}"/>
90-
<javadoc destdir="${docs.dir}"
91-
source="1.8"
92-
encoding="UTF-8"
93-
use="true"
94-
author="true"
95-
version="true"
96-
failonerror="true">
97-
<fileset dir="${src.dir}" includes="**/*.java"/>
98-
99-
<link href="${javadoc.api.url}"/>
100-
<!-- Uncomment to resolve references in Javadoc comments. -->
101-
<!--
102-
<classpath>
103-
<pathelement path="${build.dir}"/>
104-
<fileset dir="lib" includes="**/*.jar"/>
105-
</classpath>
106-
-->
107-
</javadoc>
113+
<target name="javadoc" depends="preflight" description="Generate standard API documentation">
114+
<generate-javadoc access-level="protected" output-subdir="api"/>
108115
</target>
109116

117+
<target name="javadoc-internal" depends="preflight" description="Generate internal documentation (includes private members)">
118+
<generate-javadoc access-level="private" output-subdir="internal"/>
119+
</target>
120+
121+
<target name="javadoc-all" depends="javadoc, javadoc-internal" description="Generate both standard and internal documentation sets"/>
122+
110123
<target name="package" description="Build the native installer for the current OS (DMG, DEB, or MSI)">
111124
<antcall target="dmg"/>
112125
<antcall target="debian"/>

0 commit comments

Comments
 (0)