Skip to content

Commit 39c8338

Browse files
kopporSiedlerchr
andauthored
Update to JDK25 (JabRef#14057)
* Update to JDK25 * No more icon * Try other icon file names * Lowercase * Remove *** from build output * Try to fix *.icns * Maybe all lowercase works * Try to include more files * Try JavaApp.icns * Try two times JabRef.icns * Revert last changes * Relative path for jabref.icns * Icon comes from other ways * Fix path to .icns * Add missing dot * Disable modernizer * No more JabKit (jbang works fine) * Try to fix icons * Update JBang * Update JBang scripts * Revert "Try to fix icons" This reverts commit 20aa273. * Fix casing of JabRef.icns * Try to fix notarization * Fix notarization * Remove default Rutnime-Info.plist* files * Remove Info.plist* * Remove Info-lite.plist* * Linebreak in README.md * Remove "public" for Java25 main methods * Really remove public for JDK25 main methods * Fix "public" * Switch to Temurin in IntelliJ * Add jabls to notarization * Change suffixes * Update Ubuntu from 22.04 to 24.04 * Fix JavaLanguageVersion * Switch back to ubuntu 22.04 * Add empty line to prevent merge conflicts * Fix CHANGELOG.md position * Remove merge leftovers * Revert changes in Project.xml * Streamline number of files required to update * Fix some grammar mistakes * readd mac os resources * update javafx to25.02 and see if they have it for arm * remove plist lite * Fix JavaDoc task * Refine check * Fix directory name * Try other command * Trigger build * Change icon * More output --------- Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>
1 parent 326de54 commit 39c8338

File tree

39 files changed

+132
-251
lines changed

39 files changed

+132
-251
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
// Install java.
3232
// See https://github.com/devcontainers/features/tree/main/src/java#options for details.
3333
"ghcr.io/devcontainers/features/java:1": {
34-
"version": "24.0.2-amzn",
34+
"version": "latest",
3535
"installGradle": true,
36-
"gradleVersion": "8.14.3",
36+
"gradleVersion": "latest",
3737
"jdkDistro": "Corretto"
3838
}
3939
}

.github/actions/setup-gradle/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runs:
66
- name: Setup JDK
77
uses: actions/setup-java@v5
88
with:
9-
java-version: '24'
9+
java-version: '25'
1010
distribution: 'corretto'
1111
check-latest: true
1212
- name: Setup Gradle

.github/workflows/binaries.yml

Lines changed: 64 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,20 @@ jobs:
164164
id: diskspace
165165
shell: bash
166166
run: |
167+
PR_NUMBER="${{ github.event.pull_request.number }}"
168+
TARGET="/var/www/builds.jabref.org/www/pull/$PR_NUMBER"
169+
SSH_OPTS="-p 9922 -i sshkey -o StrictHostKeyChecking=no"
170+
HOST="jrrsync@build-upload.jabref.org"
171+
if ssh $SSH_OPTS "$HOST" "test -d '$TARGET'"; then
172+
echo "☁️ Target exists: $TARGET - will upload"
173+
echo "☁️ Target exists: $TARGET - will upload" >> $GITHUB_STEP_SUMMARY
174+
echo "available=true" >> "$GITHUB_OUTPUT"
175+
exit 0
176+
fi
177+
178+
echo "🤔 Target does not exist: $TARGET"
179+
echo "🤔 Target does not exist: $TARGET" >> $GITHUB_STEP_SUMMARY
180+
167181
USAGE=$(ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no jrrsync@build-upload.jabref.org \
168182
"df --output=pcent /var/www/builds.jabref.org | tail -n1 | tr -dc '0-9'")
169183
echo "Remote usage: ${USAGE}%"
@@ -193,40 +207,40 @@ jobs:
193207
matrix:
194208
include:
195209
# if you change the os version rename all other occurrences
196-
- os: ubuntu-22.04
197-
displayName: linux
210+
- os: ubuntu-22.04 # if this is adapted, also the next lines need to be adapted
211+
displayName: linux-amd64
198212
archivePortable: tar -c -C jabgui/build/packages/ubuntu-22.04 JabRef | pigz --rsyncable > jabgui/build/packages/ubuntu-22.04/JabRef-portable_linux.tar.gz && rm -R jabgui/build/packages/ubuntu-22.04/JabRef
199213
archivePortableJabKit: tar -c -C jabkit/build/packages/ubuntu-22.04 jabkit | pigz --rsyncable > jabkit/build/packages/ubuntu-22.04/jabkit-portable_linux.tar.gz && rm -R jabkit/build/packages/ubuntu-22.04/jabkit
200214
archivePortableJabLS: tar -c -C jabls-cli/build/packages/ubuntu-22.04 jabls | pigz --rsyncable > jabls-cli/build/packages/ubuntu-22.04/jabls-portable_linux.tar.gz && rm -R jabls-cli/build/packages/ubuntu-22.04/jabls
201215
suffix: ''
202216
archForDebianRepack: '_amd64'
203-
- os: ubuntu-22.04-arm
217+
- os: ubuntu-22.04-arm # if this is adapted, also the next lines need to be adapted
204218
displayName: linux-arm
205219
archivePortable: tar -c -C jabgui/build/packages/ubuntu-22.04-arm JabRef | pigz --rsyncable > jabgui/build/packages/ubuntu-22.04-arm/JabRef-portable_linux_arm64.tar.gz && rm -R jabgui/build/packages/ubuntu-22.04-arm/JabRef
206220
archivePortableJabKit: tar -c -C jabkit/build/packages/ubuntu-22.04-arm jabkit | pigz --rsyncable > jabkit/build/packages/ubuntu-22.04-arm/jabkit-portable_linux_arm64.tar.gz && rm -R jabkit/build/packages/ubuntu-22.04-arm/jabkit
207221
archivePortableJabLS: tar -c -C jabls-cli/build/packages/ubuntu-22.04-arm jabls | pigz --rsyncable > jabls-cli/build/packages/ubuntu-22.04-arm/jabls-portable_linux_arm64.tar.gz && rm -R jabls-cli/build/packages/ubuntu-22.04-arm/jabls
208222
suffix: '_arm64'
209223
archForDebianRepack: '_arm64'
210224
- os: windows-latest
211-
displayName: windows
225+
displayName: windows-amd64
212226
archivePortable: 7z a -r jabgui/build/packages/windows-latest/JabRef-portable_windows.zip ./jabgui/build/packages/windows-latest/JabRef && rm -R jabgui/build/packages/windows-latest/JabRef
213227
archivePortableJabKit: 7z a -r jabkit/build/packages/windows-latest/jabkit-portable_windows.zip ./jabkit/build/packages/windows-latest/jabkit && rm -R jabkit/build/packages/windows-latest/jabkit
214228
archivePortableJabLS: 7z a -r jabls-cli/build/packages/windows-latest/jabls-portable_windows.zip ./jabls-cli/build/packages/windows-latest/jabls && rm -R jabls-cli/build/packages/windows-latest/jabls
215229
suffix: ''
216230
archForDebianRepack: ''
217-
- os: macos-15-intel # intel image
218-
displayName: macOS
219-
archivePortable: 7z a -r jabgui/build/packages/macos-15-intel/JabRef-portable_macos.zip ./jabgui/build/packages/macos-15-intel/JabRef.app && rm -R jabgui/build/packages/macos-15-intel/JabRef.app
220-
archivePortableJabKit: 7z a -r jabkit/build/packages/macos-15-intel/jabkit-portable_macos.zip ./jabkit/build/packages/macos-15-intel/jabkit.app && rm -R jabkit/build/packages/macos-15-intel/jabkit.app
221-
archivePortableJabLS: 7z a -r jabls-cli/build/packages/macos-15-intel/jabls-portable_macos.zip ./jabls-cli/build/packages/macos-15-intel/jabls.app && rm -R jabls-cli/build/packages/macos-15-intel/jabls.app
222-
suffix: ''
231+
- os: macos-15-intel
232+
displayName: macOS-intel
233+
archivePortable: 7z a -r jabgui/build/packages/macos-15-intel/JabRef-portable_macos-intel.zip ./jabgui/build/packages/macos-15-intel/JabRef.app && rm -R jabgui/build/packages/macos-15-intel/JabRef.app
234+
archivePortableJabKit: 7z a -r jabkit/build/packages/macos-15-intel/jabkit-portable_macos-intel.zip ./jabkit/build/packages/macos-15-intel/jabkit.app && rm -R jabkit/build/packages/macos-15-intel/jabkit.app
235+
archivePortableJabLS: 7z a -r jabls-cli/build/packages/macos-15-intel/jabls-portable_macos-intel.zip ./jabls-cli/build/packages/macos-15-intel/jabls.app && rm -R jabls-cli/build/packages/macos-15-intel/jabls.app
236+
suffix: '_intel'
223237
archForDebianRepack: ''
224238
- os: macos-15
225-
displayName: macOS-arm
226-
archivePortable: 7z a -r jabgui/build/packages/macos-15/JabRef-portable_macos-arm.zip ./jabgui/build/packages/macos-15/JabRef.app && rm -R jabgui/build/packages/macos-15/JabRef.app
227-
archivePortableJabKit: 7z a -r jabkit/build/packages/macos-15/jabkit-portable_macos-arm.zip ./jabkit/build/packages/macos-15/jabkit.app && rm -R jabkit/build/packages/macos-15/jabkit.app
228-
archivePortableJabLS: 7z a -r jabls-cli/build/packages/macos-15/jabls-portable_macos-arm.zip ./jabls-cli/build/packages/macos-15/jabls.app && rm -R jabls-cli/build/packages/macos-15/jabls.app
229-
suffix: '_arm64'
239+
displayName: macOS-silicon
240+
archivePortable: 7z a -r jabgui/build/packages/macos-15/JabRef-portable_macos-silicon.zip ./jabgui/build/packages/macos-15/JabRef.app && rm -R jabgui/build/packages/macos-15/JabRef.app
241+
archivePortableJabKit: 7z a -r jabkit/build/packages/macos-15/jabkit-portable_macos-silicon.zip ./jabkit/build/packages/macos-15/jabkit.app && rm -R jabkit/build/packages/macos-15/jabkit.app
242+
archivePortableJabLS: 7z a -r jabls-cli/build/packages/macos-15/jabls-portable_macos-silicon.zip ./jabls-cli/build/packages/macos-15/jabls.app && rm -R jabls-cli/build/packages/macos-15/jabls.app
243+
suffix: '_silicon'
230244
archForDebianRepack: ''
231245
runs-on: ${{ matrix.os }}
232246
outputs:
@@ -235,6 +249,12 @@ jobs:
235249
branchname: ${{ steps.gitversion.outputs.branchName }}
236250
name: ${{ matrix.displayName }} installer and portable version
237251
steps:
252+
- name: Install pigz and cache (linux)
253+
if: (startsWith(matrix.os, 'ubuntu'))
254+
uses: awalsh128/cache-apt-pkgs-action@latest
255+
with:
256+
packages: pigz
257+
version: 1.0
238258
- name: Fetch all history for all tags and branches
239259
uses: actions/checkout@v6
240260
with:
@@ -249,27 +269,22 @@ jobs:
249269
id: gitversion
250270
uses: gittools/actions/gitversion/execute@v3.2.1
251271
- uses: ./.github/actions/setup-gradle
252-
- name: Install pigz and cache (linux)
253-
if: (startsWith(matrix.os, 'ubuntu'))
254-
uses: awalsh128/cache-apt-pkgs-action@latest
255-
with:
256-
packages: pigz
257-
version: 1.0
272+
258273
- name: Setup macOS key chain
259274
if: (startsWith(matrix.os, 'macos')) && (needs.conditions.outputs.secretspresent == 'true')
260275
uses: slidoapp/import-codesign-certs@1923310662e8682dd05b76b612b53301f431cd5d
261276
with:
262277
p12-file-base64: ${{ secrets.OSX_SIGNING_CERT }}
263278
p12-password: ${{ secrets.OSX_CERT_PWD }}
264-
keychain-password: jabref
279+
keychain-password: tEmPoRaRY-PaeSWD
265280
- name: Setup macOS key chain for app id cert
266281
if: (startsWith(matrix.os, 'macos')) && (needs.conditions.outputs.secretspresent == 'true')
267282
uses: slidoapp/import-codesign-certs@1923310662e8682dd05b76b612b53301f431cd5d
268283
with:
269284
p12-file-base64: ${{ secrets.OSX_SIGNING_CERT_APPLICATION }}
270285
p12-password: ${{ secrets.OSX_CERT_PWD }}
271286
create-keychain: false
272-
keychain-password: jabref
287+
keychain-password: tEmPoRaRY-PaeSWD
273288
- name: Build runtime image and installer
274289
shell: bash
275290
run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" :jabgui:jpackage
@@ -387,7 +402,7 @@ jobs:
387402
name: JabRef-${{ matrix.os }}-tbn
388403
path: |
389404
jabgui/build/packages/${{ matrix.os }}
390-
jabkit/build/packages/${{ matrix.os }}
405+
jabls-cli/build/packages/${{ matrix.os }}
391406
compression-level: 0 # no compression
392407
# endregion
393408

@@ -466,11 +481,25 @@ jobs:
466481
matrix:
467482
include:
468483
- os: macos-15
469-
displayName: macOS (ARM64)
470-
suffix: _arm64
484+
displayName: JabGui macOS (ARM64)
485+
path: 'jabgui'
486+
prefix: 'JabRef'
487+
suffix: '_silicon'
488+
- os: macos-15-intel
489+
displayName: JabGui macOS (intel)
490+
path: 'jabgui'
491+
prefix: 'JabRef'
492+
suffix: '_intel'
493+
- os: macos-15
494+
displayName: jabls macOS (ARM64)
495+
path: 'jabls'
496+
prefix: 'jabls'
497+
suffix: '_silicon'
471498
- os: macos-15-intel
472-
displayName: macOS (ARM64)
473-
suffix: ""
499+
displayName: jabls macOS (intel)
500+
path: 'jabls'
501+
prefix: 'jabls'
502+
suffix: '_intel'
474503
runs-on: ${{ matrix.os }}
475504
steps:
476505
- name: Download from GitHub workflow artifacts store (macOS)
@@ -480,21 +509,21 @@ jobs:
480509
- name: Notarize dmg
481510
shell: bash
482511
run: |
483-
cd jabgui
512+
cd ${{ matrix.path }}
484513
find . -type f
485514
xcrun notarytool store-credentials "notarytool-profile" --apple-id "vorstand@jabref.org" --team-id "6792V39SK3" --password "${{ secrets.OSX_NOTARIZATION_APP_PWD }}"
486-
xcrun notarytool submit build/packages/${{ matrix.os }}/JabRef-${{ needs.build.outputs.major }}.${{ needs.build.outputs.minor }}${{ matrix.suffix}}.dmg --keychain-profile "notarytool-profile" --wait
487-
xcrun stapler staple build/packages/${{ matrix.os }}/JabRef-${{ needs.build.outputs.major }}.${{ needs.build.outputs.minor }}${{ matrix.suffix}}.dmg
515+
xcrun notarytool submit build/packages/${{ matrix.os }}/${{ matrix.prefix }}-${{ needs.build.outputs.major }}.${{ needs.build.outputs.minor }}${{ matrix.suffix}}.dmg --keychain-profile "notarytool-profile" --wait
516+
xcrun stapler staple build/packages/${{ matrix.os }}/${{ matrix.prefix }}-${{ needs.build.outputs.major }}.${{ needs.build.outputs.minor }}${{ matrix.suffix}}.dmg
488517
- name: Notarize pkg
489518
shell: bash
490519
run: |
491-
cd jabgui
520+
cd ${{ matrix.path }}
492521
xcrun notarytool store-credentials "notarytool-profile" --apple-id "vorstand@jabref.org" --team-id "6792V39SK3" --password "${{ secrets.OSX_NOTARIZATION_APP_PWD }}"
493-
xcrun notarytool submit build/packages/${{ matrix.os }}/JabRef-${{ needs.build.outputs.major }}.${{ needs.build.outputs.minor }}${{ matrix.suffix}}.pkg --keychain-profile "notarytool-profile" --wait
494-
xcrun stapler staple build/packages/${{ matrix.os }}/JabRef-${{ needs.build.outputs.major }}.${{ needs.build.outputs.minor }}${{ matrix.suffix}}.pkg
522+
xcrun notarytool submit build/packages/${{ matrix.os }}/${{ matrix.prefix }}-${{ needs.build.outputs.major }}.${{ needs.build.outputs.minor }}${{ matrix.suffix}}.pkg --keychain-profile "notarytool-profile" --wait
523+
xcrun stapler staple build/packages/${{ matrix.os }}/${{ matrix.prefix }}-${{ needs.build.outputs.major }}.${{ needs.build.outputs.minor }}${{ matrix.suffix}}.pkg
495524
- name: Upload to builds.jabref.org
496525
shell: bash
497526
run: |
498527
echo "${{ secrets.buildJabRefPrivateKey }}" > sshkey
499528
chmod 600 sshkey
500-
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ needs.build.outputs.branchname }} && rsync" -e 'ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no' jabgui/build/packages/${{ matrix.os }}/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ needs.build.outputs.branchname }}/
529+
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ needs.build.outputs.branchname }} && rsync" -e 'ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no' ${{ matrix.path }}/build/packages/${{ matrix.os }}/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ needs.build.outputs.branchname }}/

.github/workflows/sbom-pr.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ jobs:
1717
steps:
1818
- name: Checkout source
1919
uses: actions/checkout@v6
20-
with:
21-
submodules: 'true'
22-
show-progress: 'false'
20+
2321
- uses: ./.github/actions/setup-gradle
2422

2523
- name: Generate aggregated CycloneDX SBOM

.github/workflows/tests-code.yml

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ jobs:
112112
modernizer:
113113
name: Modernizer
114114
runs-on: ubuntu-latest
115+
# Version 1.11.0 does not run on JDK25: "java.lang.reflect.InvocationTargetException"
116+
if: false
115117
steps:
116118
- name: Checkout source
117119
uses: actions/checkout@v6
@@ -456,7 +458,7 @@ jobs:
456458
- name: Set up JDK
457459
uses: actions/setup-java@v5
458460
with:
459-
java-version: 24
461+
java-version: 25
460462
distribution: 'corretto'
461463
cache: maven
462464
check-latest: true
@@ -510,7 +512,6 @@ jobs:
510512
steps:
511513
- name: Check secrets presence
512514
id: checksecrets
513-
if: github.ref == 'refs/heads/main'
514515
shell: bash
515516
run: |
516517
if [ "$CODECOV_TOKEN" == "" ]; then
@@ -523,34 +524,11 @@ jobs:
523524
env:
524525
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
525526
- name: Checkout source
526-
if: github.ref == 'refs/heads/main'
527527
uses: actions/checkout@v6
528528
with:
529529
submodules: 'true'
530530
show-progress: 'false'
531-
- name: Set up JDK
532-
if: github.ref == 'refs/heads/main'
533-
uses: actions/setup-java@v5
534-
with:
535-
java-version: 24
536-
distribution: 'corretto'
537-
check-latest: true
538-
- name: Setup Gradle
539-
uses: gradle/actions/setup-gradle@v5
540-
- name: Generate JBang cache key
541-
id: cache-key
542-
shell: bash
543-
run: |
544-
echo "cache_key=jbang-$(date +%Y-%m)" >> $GITHUB_OUTPUT
545-
- name: Use cache
546-
uses: actions/cache/restore@v5
547-
with:
548-
path: ~/.jbang
549-
key: ${{ steps.cache-key.outputs.cache_key }}
550-
restore-keys:
551-
jbang-
552-
- name: Setup JBang
553-
uses: jbangdev/setup-jbang@main
531+
- uses: ./.github/actions/setup-gradle
554532
- name: Update test coverage metrics
555533
if: (github.ref == 'refs/heads/main') && (steps.checksecrets.outputs.secretspresent == 'YES')
556534
run: xvfb-run --auto-servernum ./gradlew jacocoTestReport
@@ -578,7 +556,7 @@ jobs:
578556
- name: Set up JDK
579557
uses: actions/setup-java@v5
580558
with:
581-
java-version: 24
559+
java-version: 25
582560
distribution: 'corretto'
583561
check-latest: true
584562
- name: Setup Gradle

.jbang/CheckoutPR.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
//DEPS org.eclipse.jgit:org.eclipse.jgit.pgm:7.5.0.202512021534-r
2525

2626
public class CheckoutPR {
27-
public static void main(String[] args) throws Exception {
27+
static void main(String[] args) throws Exception {
2828
GitHub github = new GitHubBuilder().build();
2929
GHRepository repo = github.getRepository("JabRef/jabref");
3030

.jbang/CloneJabRef.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//DEPS org.eclipse.jgit:org.eclipse.jgit.pgm:7.5.0.202512021534-r
1010

1111
public class CloneJabRef {
12-
public static void main(String[] args) throws Exception {
12+
static void main(String[] args) throws Exception {
1313
Path targetDir;
1414
if (args.length == 1) {
1515
targetDir = Path.of(args[0]).toAbsolutePath();

.jbang/JabKitLauncher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
//DESCRIPTION jabkit - mange BibTeX files using JabRef
44

5-
//JAVA 24+
5+
//JAVA 25+
66
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED
77

88
// raw is for https://github.com/unicode-org/icu/pull/2127

.jbang/JabLsLauncher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
//DESCRIPTION jabls - start a bibtex languageserver
44

5-
//JAVA 24+
5+
//JAVA 25+
66
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED
77

88
// raw is for https://github.com/unicode-org/icu/pull/2127

.jbang/JabSrvLauncher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
//DESCRIPTION jabsrv - serve BibTeX files using JabRef
44

5-
//JAVA 24+
5+
//JAVA 25+
66
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED
77

88
// raw is for https://github.com/unicode-org/icu/pull/2127

0 commit comments

Comments
 (0)