Skip to content

Commit aca5bea

Browse files
author
mrhunsaker
committed
javadoc updates
1 parent 5ae91fe commit aca5bea

File tree

449 files changed

+61378
-10914
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

449 files changed

+61378
-10914
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "**" ]
6+
pull_request:
7+
branches: [ "**" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up JDK 21
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: temurin
20+
java-version: '21'
21+
cache: maven
22+
23+
- name: Build and test
24+
run: mvn -B -U -e -V clean verify
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: Package Linux (deb, rpm, AppImage)
2+
3+
on:
4+
workflow_dispatch: {}
5+
6+
env:
7+
APP_NAME: StudentDataGUI
8+
9+
jobs:
10+
linux-packages:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up JDK 21 (with jpackage)
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: temurin
20+
java-version: '21'
21+
cache: maven
22+
23+
- name: Prepare tooling
24+
run: |
25+
sudo apt-get update
26+
# For building RPMs via jpackage
27+
sudo apt-get install -y rpm
28+
# Optional: tools often needed by AppImage flows
29+
sudo apt-get install -y libfuse2 zsync
30+
31+
- name: Resolve project version
32+
id: meta
33+
shell: bash
34+
run: |
35+
set -euo pipefail
36+
VERSION=$(mvn -q -Dexec.cleanupDaemonThreads=false -DforceStdout help:evaluate -Dexpression=project.version)
37+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
38+
echo "vversion=v$VERSION" >> "$GITHUB_OUTPUT"
39+
40+
- name: Build JAR
41+
run: mvn -B -U -e -DskipTests package
42+
43+
- name: Locate built JAR
44+
id: jar
45+
run: |
46+
set -euo pipefail
47+
JAR=$(ls -t target/*-shaded.jar 2>/dev/null | head -n1)
48+
if [ -z "$JAR" ]; then JAR=$(ls -t target/*.jar | grep -vE 'sources|original|tests' | head -n1); fi
49+
if [ -z "$JAR" ]; then echo "No JAR found in target" >&2; exit 1; fi
50+
echo "path=$JAR" >> "$GITHUB_OUTPUT"
51+
echo "file=$(basename "$JAR")" >> "$GITHUB_OUTPUT"
52+
53+
- name: Create output directories
54+
run: |
55+
mkdir -p dist/linux/appimage dist/linux/deb dist/linux/rpm
56+
57+
- name: Build DEB (jpackage)
58+
run: |
59+
"$JAVA_HOME/bin/jpackage" \
60+
--type deb \
61+
--input target \
62+
--main-jar "${{ steps.jar.outputs.file }}" \
63+
--name "$APP_NAME" \
64+
--app-version "${{ steps.meta.outputs.version }}" \
65+
--icon examples/icons/scatter-plot-256.png \
66+
--dest dist/linux/deb
67+
f=$(ls -t dist/linux/deb/*.deb | head -n1); if [ -n "$f" ]; then mv "$f" "dist/linux/deb/${APP_NAME}-${{ steps.meta.outputs.vversion }}.deb"; fi
68+
69+
- name: Build RPM (jpackage)
70+
run: |
71+
# jpackage requires rpm-build; installed earlier
72+
"$JAVA_HOME/bin/jpackage" \
73+
--type rpm \
74+
--input target \
75+
--main-jar "${{ steps.jar.outputs.file }}" \
76+
--name "$APP_NAME" \
77+
--app-version "${{ steps.meta.outputs.version }}" \
78+
--icon examples/icons/scatter-plot-256.png \
79+
--dest dist/linux/rpm
80+
f=$(ls -t dist/linux/rpm/*.rpm | head -n1); if [ -n "$f" ]; then mv "$f" "dist/linux/rpm/${APP_NAME}-${{ steps.meta.outputs.vversion }}.rpm"; fi
81+
82+
- name: Build AppImage (via appimagetool if available)
83+
continue-on-error: true
84+
shell: bash
85+
run: |
86+
set -euxo pipefail
87+
APPDIR_ROOT="dist/linux/appimage"
88+
"$JAVA_HOME/bin/jpackage" \
89+
--type app-image \
90+
--input target \
91+
--main-jar "${{ steps.jar.outputs.file }}" \
92+
--name "$APP_NAME" \
93+
--app-version "${{ steps.meta.outputs.version }}" \
94+
--icon examples/icons/scatter-plot-256.png \
95+
--dest "$APPDIR_ROOT"
96+
97+
APPDIR=$(find "$APPDIR_ROOT" -maxdepth 1 -type d -name "*${APP_NAME}*" | head -n1)
98+
if [ -z "$APPDIR" ]; then echo "Could not find jpackage app-image directory" >&2; exit 1; fi
99+
100+
# Try to fetch appimagetool and build .AppImage; fall back to zipping the app-image directory
101+
mkdir -p "$APPDIR_ROOT/out"
102+
pushd "$APPDIR_ROOT" >/dev/null
103+
APPIMAGE_TOOL_URL="https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage"
104+
curl -fsSL "$APPIMAGE_TOOL_URL" -o appimagetool
105+
chmod +x appimagetool || true
106+
if ./appimagetool --appimage-extract-and-run "$(basename "$APPDIR")"; then
107+
AI=$(ls -t "$APPDIR_ROOT"/*.AppImage 2>/dev/null | head -n1 || true)
108+
if [ -n "$AI" ]; then mv "$AI" "$APPDIR_ROOT/${APP_NAME}-${{ steps.meta.outputs.vversion }}.AppImage"; fi
109+
echo "AppImage built successfully"
110+
else
111+
echo "appimagetool failed; creating zip of app-image directory instead" >&2
112+
zip -r "${APP_NAME}-${{ steps.meta.outputs.vversion }}-appimage.zip" "$(basename "$APPDIR")" || echo "Failed to create zip archive"
113+
fi
114+
popd >/dev/null
115+
116+
- name: Upload DEB and RPM artifacts (core Linux packages)
117+
uses: actions/upload-artifact@v4
118+
with:
119+
name: linux-packages
120+
path: |
121+
dist/linux/deb/**
122+
dist/linux/rpm/**
123+
124+
- name: Upload AppImage artifacts (optional - may fail)
125+
continue-on-error: true
126+
uses: actions/upload-artifact@v4
127+
with:
128+
name: linux-packages
129+
path: |
130+
dist/linux/appimage/**
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Package macOS (DMG)
2+
3+
on:
4+
workflow_dispatch: {}
5+
6+
env:
7+
APP_NAME: StudentDataGUI
8+
9+
jobs:
10+
macos-dmg:
11+
runs-on: macos-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up JDK 21 (with jpackage)
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: temurin
20+
java-version: '21'
21+
cache: maven
22+
23+
- name: Resolve project meta
24+
id: meta
25+
shell: bash
26+
run: |
27+
set -euo pipefail
28+
VERSION=$(mvn -q -Dexec.cleanupDaemonThreads=false -DforceStdout help:evaluate -Dexpression=project.version)
29+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
30+
echo "vversion=v$VERSION" >> "$GITHUB_OUTPUT"
31+
32+
- name: Build JAR
33+
run: mvn -B -U -e -DskipTests package
34+
35+
- name: Generate .icns from PNG set
36+
run: |
37+
chmod +x examples/scripts/create-mac-iconset.sh
38+
# Use the provided PNGs as source; output an icns in the workspace root
39+
examples/scripts/create-mac-iconset.sh examples/icons scatter-plot.icns
40+
41+
- name: Locate built JAR
42+
id: jar
43+
run: |
44+
set -euo pipefail
45+
JAR=$(ls -t target/*-shaded.jar 2>/dev/null | head -n1)
46+
if [ -z "$JAR" ]; then JAR=$(ls -t target/*.jar | grep -vE 'sources|original|tests' | head -n1); fi
47+
if [ -z "$JAR" ]; then echo "No JAR found in target" >&2; exit 1; fi
48+
echo "path=$JAR" >> "$GITHUB_OUTPUT"
49+
echo "file=$(basename "$JAR")" >> "$GITHUB_OUTPUT"
50+
51+
- name: Create output directory
52+
run: mkdir -p dist/macos
53+
54+
- name: Build DMG (jpackage)
55+
run: |
56+
"$JAVA_HOME/bin/jpackage" \
57+
--type dmg \
58+
--input target \
59+
--main-jar "${{ steps.jar.outputs.file }}" \
60+
--name "$APP_NAME" \
61+
--app-version "${{ steps.meta.outputs.version }}" \
62+
--icon scatter-plot.icns \
63+
--dest dist/macos
64+
f=$(ls -t dist/macos/*.dmg | head -n1); if [ -n "$f" ]; then mv "$f" "dist/macos/${APP_NAME}-${{ steps.meta.outputs.vversion }}.dmg"; fi
65+
66+
- name: Upload DMG artifact
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: macos-dmg
70+
path: dist/macos/*.dmg
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Package Windows (MSI)
2+
3+
on:
4+
workflow_dispatch: {}
5+
6+
env:
7+
APP_NAME: StudentDataGUI
8+
9+
jobs:
10+
windows-msi:
11+
runs-on: windows-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up JDK 21 (with jpackage)
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: temurin
20+
java-version: '21'
21+
cache: maven
22+
23+
- name: Resolve project meta
24+
id: meta
25+
shell: bash
26+
run: |
27+
set -euo pipefail
28+
VERSION=$(mvn -q -Dexec.cleanupDaemonThreads=false -DforceStdout help:evaluate -Dexpression=project.version)
29+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
30+
echo "vversion=v$VERSION" >> "$GITHUB_OUTPUT"
31+
32+
- name: Build JAR
33+
run: mvn -B -U -e -DskipTests package
34+
35+
- name: Locate built JAR
36+
id: jar
37+
shell: pwsh
38+
run: |
39+
$jar = Get-ChildItem -Path target -Filter "*-shaded.jar" -File | Sort-Object LastWriteTime -Descending | Select-Object -First 1
40+
if (-not $jar) { $jar = Get-ChildItem -Path target -Filter "*.jar" -File | Where-Object { $_.Name -notmatch 'sources|original|tests' } | Sort-Object LastWriteTime -Descending | Select-Object -First 1 }
41+
if (-not $jar) { throw "No JAR found in target" }
42+
"path=$($jar.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
43+
"file=$($jar.Name)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
44+
45+
- name: Create output directory
46+
shell: pwsh
47+
run: New-Item -ItemType Directory -Path dist\windows -Force | Out-Null
48+
49+
- name: Build MSI (jpackage)
50+
shell: pwsh
51+
run: |
52+
& "$env:JAVA_HOME\bin\jpackage.exe" `
53+
--type msi `
54+
--input target `
55+
--main-jar "${{ steps.jar.outputs.file }}" `
56+
--name "$env:APP_NAME" `
57+
--app-version "${{ steps.meta.outputs.version }}" `
58+
--icon examples\icons\scatter-plot-256.ico `
59+
--dest dist\windows `
60+
--win-menu --win-shortcut --win-dir-chooser
61+
$msi = Get-ChildItem -Path dist\windows -Filter "*.msi" -File | Sort-Object LastWriteTime -Descending | Select-Object -First 1
62+
if ($msi) { Move-Item -Path $msi.FullName -Destination ("dist\windows\{0}-{1}.msi" -f $env:APP_NAME, "${{ steps.meta.outputs.vversion }}") -Force }
63+
64+
- name: Upload MSI artifact
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: windows-msi
68+
path: dist/windows/*.msi

0 commit comments

Comments
 (0)