Skip to content

Commit

Permalink
Merge branch 'JabRef:main' into JabRef#3197-TeXworks
Browse files Browse the repository at this point in the history
  • Loading branch information
vladdobre authored Mar 1, 2024
2 parents bd834b9 + 94928dd commit 69876f8
Show file tree
Hide file tree
Showing 39 changed files with 793 additions and 320 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/add-to-projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,30 @@ jobs:
- name: "good first issue"
if: "${{ github.event.label.name == 'good first issue' }}"
env:
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ITEM_ADD }}
run: |
ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH")
gh project item-add 5 --owner jabref --url $ISSUE_URL
gh project item-add 5 --owner JabRef --url $ISSUE_URL
- name: needs-refinement
if: github.event.label.name == 'needs-refinement'
env:
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ITEM_ADD }}
run: |
ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH")
gh project item-add 15 --owner jabref --url $ISSUE_URL
gh project item-add 15 --owner JabRef --url $ISSUE_URL
- name: "status: freeze"
if: "${{ github.event.label.name == 'status: freeze' }}"
env:
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ITEM_ADD }}
run: |
ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH")
gh project item-add 9 --owner jabref --url $ISSUE_URL
gh project item-add 9 --owner JabRef --url $ISSUE_URL
- name: ui
if: "${{ github.event.label.name == 'ui' }}"
env:
GH_TOKEN: ${{ github.token }}
GH_DEBUG: api
GH_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ITEM_ADD }}
run: |
ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH")
gh project item-add 8 --owner jabref --url $ISSUE_URL
echo $ISSUE_URL
gh project item-add 8 --owner JabRef --url $ISSUE_URL
53 changes: 35 additions & 18 deletions .github/workflows/deployment-jdk-ea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,38 @@ concurrency:
cancel-in-progress: true

jobs:
setup-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.javafx_versions.outputs.matrix }}
steps:
- id: javafx_versions
run: |
curl -s "https://search.maven.org/solrsearch/select?q=g:org.openjfx+AND+a:javafx&rows=5&core=gav" > /tmp/versions.json
jq '[.response.docs[] | select(.v | test(".*-ea\\+.*")) | select(.v | test("^17") | not) | {version: .v}] | group_by(.version | capture("^(?<major>\\d+).*").major) | map(max_by(.version))' < /tmp/versions.json > /tmp/versions-latest.json
versions_json=$(jq -r '[.[].version]' /tmp/versions-latest.json | jq -r tostring)
include_json=$(jq -n '[
{"os": "ubuntu-latest", "displayName": "linux", "archivePortable": "tar -c -C build/distribution JabRef | pigz --rsyncable > build/distribution/JabRef-portable_linux.tar.gz && rm -R build/distribution/JabRef"},
{"os": "buildjet-4vcpu-ubuntu-2204-arm", "displayName": "linux-arm", "archivePortable": "tar -c -C build/distribution JabRef | pigz --rsyncable > build/distribution/JabRef-portable_linux-arm64.tar.gz && rm -R build/distribution/JabRef"},
{"os": "windows-latest", "displayName": "windows", "archivePortable": "7z a -r build/distribution/JabRef-portable_windows.zip ./build/distribution/JabRef && rm -R build/distribution/JabRef"},
{"os": "macos-latest", "displayName": "macOS", "archivePortable": "brew install pigz && tar -c -C build/distribution JabRef.app | pigz --rsyncable > build/distribution/JabRef-portable_macos.tar.gz && rm -R build/distribution/JabRef.app"}
]')
matrix=$(jq -n \
--argjson versionsContent "$versions_json" \
--argjson includeContent "$include_json" \
'{"os": ["ubuntu-latest", "windows-latest", "macos-latest", "buildjet-4vcpu-ubuntu-2204-arm"], "jdk": [22, 23], "javafx": $versionsContent, "include": $includeContent}')
echo matrix=$matrix >> $GITHUB_OUTPUT
build:
needs: setup-matrix
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
jdk: [22, 23]
include:
- os: ubuntu-latest
displayName: linux
archivePortable: tar -c -C build/distribution JabRef | pigz --rsyncable > build/distribution/JabRef-portable_linux.tar.gz && rm -R build/distribution/JabRef
- os: windows-latest
displayName: windows
archivePortable: 7z a -r build/distribution/JabRef-portable_windows.zip ./build/distribution/JabRef && rm -R build/distribution/JabRef
- os: macos-latest
displayName: macOS
archivePortable: brew install pigz && tar -c -C build/distribution JabRef.app | pigz --rsyncable > build/distribution/JabRef-portable_macos.tar.gz && rm -R build/distribution/JabRef.app
matrix: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
runs-on: ${{ matrix.os }}
outputs:
major: ${{ steps.gitversion.outputs.Major }}
minor: ${{ steps.gitversion.outputs.Minor }}
branchname: ${{ steps.gitversion.outputs.branchName }}
name: "JDK ${{ matrix.jdk }}: ${{ matrix.displayName }} installer and portable version"
name: "JDK ${{ matrix.jdk }}: ${{ matrix.displayName }} JavaFX ${{ matrix.javafx }}"
steps:
- name: Check secrets presence
id: checksecrets
Expand All @@ -71,8 +81,9 @@ jobs:
submodules: 'true'
show-progress: 'false'
- name: Install pigz and cache (linux)
if: (matrix.os == 'ubuntu-latest')
uses: awalsh128/cache-apt-pkgs-action@latest
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'buildjet-4vcpu-ubuntu-2204-arm')
# 1.3.1 works, 1.4.1 does not (https://github.com/awalsh128/cache-apt-pkgs-action/issues/126)
uses: koppor/cache-apt-pkgs-action@add-arm64-support
with:
packages: pigz
version: 1.0
Expand Down Expand Up @@ -100,6 +111,12 @@ jobs:
if: (matrix.os == 'macos-latest')
shell: bash
run: sed -i'.bak' 's/JavaLanguageVersion.of(.*)/JavaLanguageVersion.of(${{ matrix.jdk }})/' build.gradle
- name: 'Set JavaFX (linux, Windows)'
if: (matrix.os != 'macos-latest')
run: sed -i '/javafx {/{n;s/version = ".*"/version = "${{ matrix.javafx }}"/}' build.gradle
- name: 'Set JavaFX (macOS)'
if: (matrix.os == 'macos-latest')
run: sed -i '.bak' -e '/javafx {/{n' -e 's/version = ".*"/version = "${{ matrix.javafx }}"/;}' build.gradle
- name: Setup JDK
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -141,7 +158,7 @@ jobs:
get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "${{ steps.gitversion.outputs.AssemblySemVer }}","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}"}
get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "portable","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}-portable"}
- name: Repack deb file for Debian
if: (matrix.os == 'ubuntu-latest') && (steps.checksecrets.outputs.secretspresent == 'YES')
if: (matrix.os == 'ubuntu-latest')
shell: bash
run: |
cd build/distribution
Expand All @@ -157,7 +174,7 @@ jobs:
for file in build/distribution/*.*; do
base=${file%.*}
ext=${file##*.}
mv "$file" "${base}-jdk${{ matrix.jdk }}.${ext}"
mv "$file" "${base}-jdk${{ matrix.jdk }}-javafx${{ matrix.javafx }}.${ext}"
done
- name: Setup rsync (macOS)
if: (matrix.os == 'macos-latest') && (steps.checksecrets.outputs.secretspresent == 'YES') && (!startsWith(github.ref, 'refs/heads/gh-readonly-queue'))
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We added a fetcher for [ISIDORE](https://isidore.science/), simply paste in the link into the text field or the last 6 digits in the link that identify that paper. [#10423](https://github.com/JabRef/jabref/issues/10423)
- When importing entries form the "Citation relations" tab, the field [cites](https://docs.jabref.org/advanced/entryeditor/entrylinks) is now filled according to the relationship between the entries. [#10572](https://github.com/JabRef/jabref/pull/10752)
- We added a new group icon column to the main table showing the icons of the entry's groups. [#10801](https://github.com/JabRef/jabref/pull/10801)
- When deleting an entry, the files linked to the entry are now optionally deleted as well. [#10509](https://github.com/JabRef/jabref/issues/10509)
- We added support to move the file to the system trash (instead of deleting it). [#10591](https://github.com/JabRef/jabref/pull/10591)
- We added ability to jump to an entry in the command line using `-j CITATIONKEY`. [koppor#540](https://github.com/koppor/jabref/issues/540)
- We added a new boolean to the style files for Openoffice/Libreoffice integration to switch between ZERO_WIDTH_SPACE (default) and no space. [#10843](https://github.com/JabRef/jabref/pull/10843)
- When pasting HTML into the abstract or a comment field, the hypertext is automatically converted to Markdown. [#10558](https://github.com/JabRef/jabref/issues/10558)
- We added the possibility to redownload files that had been present but are no longer in the specified location. [#10848](https://github.com/JabRef/jabref/issues/10848)
- We added the citation key pattern `[camelN]`. Equivalent to the first N words of the `[camel]` pattern.
- We added ability to export in CFF (Citation File Format) [#10661](https://github.com/JabRef/jabref/issues/10661).

### Changed

Expand All @@ -31,6 +34,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We changed the arrangement of the lists in the "Citation relations" tab. `Cites` are now on the left and `Cited by` on the right [#10572](https://github.com/JabRef/jabref/pull/10752)
- Sub libraries based on `aux` file can now also be generated if some citations are not found library. [#10775](https://github.com/JabRef/jabref/pull/10775)
- We rearranged the tab order in the entry editor and renamed the "Scite Tab" to "Citation information". [#10821](https://github.com/JabRef/jabref/issues/10821)
- We changed the duplicate handling in the Import entries dialog. Potential duplicate entries are marked with an icon and importing will now trigger the merge dialog [#10914](https://github.com/JabRef/jabref/pull/10914)
- We made the command "Push to TexShop" more robust to allow cite commands with a character before the first slash. [forum#2699](https://discourse.jabref.org/t/push-to-texshop-mac/2699/17?u=siedlerchr)
- We only show the notification "Saving library..." if the library contains more than 2000 entries. [#9803](https://github.com/JabRef/jabref/issues/9803)
- We enhanced the dialog for adding new fields in the content selector with a selection box containing a list of standard fields. [#10912](https://github.com/JabRef/jabref/pull/10912)
Expand All @@ -42,10 +46,12 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We fixed an issue where the preview panel showing the wrong entry (an entry that is not selected in the entry table). [#9172](https://github.com/JabRef/jabref/issues/9172)
- We fixed an issue where HTML-reserved characters like '&' and '<', in addition to HTML entities like '&amp;' were not rendered correctly in entry preview. [#10677](https://github.com/JabRef/jabref/issues/10677)
- The last page of a PDF is now indexed by the full text search. [#10193](https://github.com/JabRef/jabref/issues/10193)
- The default owner of an entry can be changed again. [#10924](https://github.com/JabRef/jabref/issues/10924)
- We fixed an issue where the duplicate check did not take umlauts or other LaTeX-encoded characters into account. [#10744](https://github.com/JabRef/jabref/pull/10744)
- We fixed the colors of the icon on hover for unset special fields. [#10431](https://github.com/JabRef/jabref/issues/10431)
- We fixed an issue where the CrossRef field did not work if autocompletion was disabled [#8145](https://github.com/JabRef/jabref/issues/8145)
- We fixed an issue where exporting`@electronic` and `@online` entry types to the Office XMl would duplicate the field `title` [#10807](https://github.com/JabRef/jabref/issues/10807)
- We fixed an issue where the `CommentsTab` was not properly formatted when the `defaultOwner` contained capital or special letters. [#10870](https://github.com/JabRef/jabref/issues/10870)

### Removed

Expand Down
23 changes: 13 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.jabref.build.xjc.XjcTask
plugins {
id 'application'

id 'com.github.andygoossens.modernizer' version '1.9.0'
id 'com.github.andygoossens.modernizer' version '1.9.2'

id 'me.champeau.jmh' version '0.7.2'

Expand Down Expand Up @@ -119,11 +119,12 @@ dependencies {
exclude group: 'org.junit.jupiter'
}

implementation 'org.apache.lucene:lucene-core:9.9.2'
implementation 'org.apache.lucene:lucene-queryparser:9.9.2'
implementation 'org.apache.lucene:lucene-queries:9.9.1'
implementation 'org.apache.lucene:lucene-analysis-common:9.9.2'
implementation 'org.apache.lucene:lucene-highlighter:9.9.2'
def luceneVersion = "9.10.0"
implementation "org.apache.lucene:lucene-core:$luceneVersion"
implementation "org.apache.lucene:lucene-queryparser:$luceneVersion"
implementation "org.apache.lucene:lucene-queries:$luceneVersion"
implementation "org.apache.lucene:lucene-analysis-common:$luceneVersion"
implementation "org.apache.lucene:lucene-highlighter:$luceneVersion"

implementation group: 'org.apache.commons', name: 'commons-csv', version: '1.10.0'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0'
Expand Down Expand Up @@ -176,7 +177,7 @@ dependencies {
implementation('com.tobiasdiez:easybind:2.2.1-SNAPSHOT')
implementation 'org.fxmisc.flowless:flowless:0.7.2'
implementation 'org.fxmisc.richtext:richtextfx:0.11.2'
implementation (group: 'com.dlsc.gemsfx', name: 'gemsfx', version: '1.97.0') {
implementation (group: 'com.dlsc.gemsfx', name: 'gemsfx', version: '2.0.3') {
exclude module: 'javax.inject' // Split package, use only jakarta.inject
exclude group: 'org.apache.logging.log4j'
}
Expand All @@ -195,7 +196,7 @@ dependencies {
// route all requests to java.util.logging to SLF4J (which in turn routes to tinylog)
implementation 'org.slf4j:jul-to-slf4j:2.0.9'
// route all requests to log4j to SLF4J
implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.22.1'
implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.23.0'

implementation('de.undercouch:citeproc-java:3.0.0-beta.2') {
exclude group: 'org.antlr'
Expand Down Expand Up @@ -560,7 +561,7 @@ tasks.register('deleteInstallerTemp', Delete) {
jpackage.dependsOn deleteInstallerTemp
jlinkZip.dependsOn jpackage
jlink {
addOptions('--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages')
addOptions('--strip-debug', '--compress', 'zip-6', '--no-header-files', '--no-man-pages')
launcher {
name = 'JabRef'
}
Expand All @@ -577,7 +578,8 @@ jlink {

// TODO: Remove the following correction to the merged module
// The module descriptor automatically generated by the plugin for the merged module contained some invalid entries.
// Execute ./gradlew suggestMergedModuleInfo and include the suggested directives here.
// This is based on ./gradlew suggestMergedModuleInfo, sort, strip ";"", comment non-used modules, and include the suggested directives here.
// However, we need to fine-tune this manually (non-alphabetic order)
mergedModule {
requires 'java.compiler'
requires 'java.datatransfer'
Expand All @@ -600,6 +602,7 @@ jlink {
requires 'jdk.security.jgss'
requires 'jdk.xml.dom'
requires 'com.google.gson'
requires 'org.jsoup'
requires 'org.slf4j'
requires 'jakarta.xml.bind'
requires 'org.apache.commons.lang3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ Press "OK".
## Disable too advanced code folding

Go to **File > Settings... > Editor > General > Code Folding**.
At "Java", disable "General > File header", "General > Imports", and "Java > One-line methods".
At section "General", disable "File header" and "Imports".
At section "Java", disable "One-line methods".

{% figure caption:"Code foldings disabled" %}
![Code foldings disabled](guidelines-settings-intellij-code-foldings.png)
Expand Down
Loading

0 comments on commit 69876f8

Please sign in to comment.