Skip to content
forked from JabRef/jabref

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into prefs_keygen_mvvm
Browse files Browse the repository at this point in the history
  • Loading branch information
calixtus committed Oct 12, 2019
2 parents a844c5c + d4d3764 commit 7a39096
Show file tree
Hide file tree
Showing 24 changed files with 410 additions and 125 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11.0.4
java-version: 12.0.2
- name: Download jpackage
# We need to download jpackage from https://jdk.java.net/jpackage/
run: |
Expand Down Expand Up @@ -88,8 +88,8 @@ jobs:
env:
SNAPCRAFT_LOGIN_FILE: ${{ secrets.SNAPCRAFT_LOGIN_FILE }}
run: |
docker run -v $(pwd):$(pwd) -t lyzardking/snapcraft-bionic sh -c "apt update -qq && cd $(pwd) && snapcraft && mv jabref*.snap build/distribution/"
# cd build/distribution/ && mdkir .snapcraft && echo ${SNAPCRAFT_LOGIN_FILE} | base64 --decode --ignore-garbage > .snapcraft/snapcraft.cfg && snapcraft push --release=beta *.snap
mkdir .snapcraft && echo ${SNAPCRAFT_LOGIN_FILE} | base64 --decode --ignore-garbage > .snapcraft/snapcraft.cfg
docker run -v $(pwd):$(pwd) -t lyzardking/snapcraft-bionic sh -c "apt update -qq && cd $(pwd) && snapcraft && mv jabref*.snap build/distribution/ && snapcraft push build/distribution/jabref*.snap --release edge || true"
shell: bash
- name: Upload to builds.jabref.org
uses: garygrossgarten/github-action-scp@release
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: java
jdk:
- openjdk11
- openjdk12

# we test at Ubuntu Trusty (Ubuntu 14.04 LTS)
# see https://docs.travis-ci.com/user/trusty-ci-environment/
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where it was no longer possible to connect to LibreOffice. [#5261](https://github.com/JabRef/jabref/issues/5261)
- The "All entries group" is no longer shown when no library is open.
- We fixed an exception which occurred when closing JabRef. [#5348](https://github.com/JabRef/jabref/issues/5348)
- We fixed a few problems that prevented JabFox to communicate with JabRef. [#4737](https://github.com/JabRef/jabref/issues/4737) [#4303](https://github.com/JabRef/jabref/issues/4303)
- We fixed an error where the groups containing an entry loose their highlight color when scrolling. [#5022](https://github.com/JabRef/jabref/issues/5022)
- We fixed an error where an exception was thrown when merging entries. [#5169](https://github.com/JabRef/jabref/issues/5169)
- After assigning an entry to a group, the item count is now properly colored to reflect the new membership of the entry. [#3112](https://github.com/JabRef/jabref/issues/3112)
- The group panel is now properly updated when switching between libraries (or when closing/opening one). [#3142](https://github.com/JabRef/jabref/issues/3142)
- We fixed an error where the number of matched entries shown in the group pane was not updated correctly. [#4441](https://github.com/JabRef/jabref/issues/4441)
- We fixed an issue where empty keywords lead to a strange display of automatic keyword groups. [#5333](https://github.com/JabRef/jabref/issues/5333)
- We fixed an error where the default color of a new group was white instead of dark gray. [#4868](https://github.com/JabRef/jabref/issues/4868)
- We fixed an issue where the first field in the entry editor got the focus while performing a different action (like searching). [#5084](https://github.com/JabRef/jabref/issues/5084)
- We fixed an error mentioning "javafx.controls/com.sun.javafx.scene.control" that was thrown when interacting with the toolbar.
- We fixed an error where a cleared search was restored after switching libraries. [#4846](https://github.com/JabRef/jabref/issues/4846)
- We fixed an exception which occurred when trying to open a non-existing file from the "Recent files"-menu [#5334](https://github.com/JabRef/jabref/issues/5334)
Expand Down
41 changes: 29 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
# Contributing Guide

After reading through this guide, check out some good first issues to contribute to by clicking here: [Good First Issues](https://github.com/JabRef/jabref/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)


## Understanding the basics

We welcome contributions to JabRef and encourage you to follow the GitHub workflow specified below. If you are not familiar with this type of workflow, take a look at GitHub's excellent overview on the [GitHub flow](https://guides.github.com/introduction/flow/index.html) and the explanation of [Feature Branch Workflow](https://atlassian.com/git/tutorials/comparing-workflows#feature-branch-workflow) for the idea behind this kind of development.
1. Get the JabRef code on your local machine. Detailed instructions about this step can be found in our [guidelines for setting up a local workspace](https://github.com/JabRef/jabref/wiki/Guidelines-for-setting-up-a-local-workspace).
1. Fork the JabRef into your GitHub account.
2. Clone your forked repository on your local machine.
3. **Create a new branch** (such as `fix-for-issue-121`). Be sure to create a **separate branch** for each improvement you implement.
4. Do your work on the **new branch - not the master branch.** Refer to our [code howtos](https://github.com/JabRef/jabref/wiki/Code-Howtos) if you have questions about your implementation.
5. Create a pull request. For an overview of pull requests, take a look at GitHub's [pull request help documentation](https://help.github.com/articles/about-pull-requests/).
2. **Create a new branch** (such as `fix-for-issue-121`). Be sure to create a **separate branch** for each improvement you implement.
3. Do your work on the **new branch - not the master branch.** Refer to our [code howtos](https://github.com/JabRef/jabref/wiki/Code-Howtos) if you have questions about your implementation.
4. Create a pull request. For an overview of pull requests, take a look at GitHub's [pull request help documentation](https://help.github.com/articles/about-pull-requests/).
5. In case your pull request is not yet complete or not yet ready for review, consider creating a [draft pull request](https://github.blog/2019-02-14-introducing-draft-pull-requests/) instead.

In case you have any questions, do not hesitate to write one of our [JabRef developers](https://github.com/orgs/JabRef/teams/developers) an email. We should also be online at [gitter](https://gitter.im/JabRef/jabref).


## Formal requirements for a pull request

The main goal of the formal requirements is to provide credit to you and to be able to understand the patch.


### Add your change to CHANGELOG.md

You should edit the [CHANGELOG.md](CHANGELOG.md) located in the root directory of the JabRef source.
Add a line with your changes in the appropriate section.

If you did internal refactorings or improvements not visible to the user (e.g., UI, .bib file), then you don't need to put an entry there.


#### Key format

Example: `<kbd>Ctrl</kbd> + <kbd>Enter</kbd>`

In case you add keys to the changelog, please follow these rules:
Expand All @@ -34,8 +43,9 @@ In case you add keys to the changelog, please follow these rules:


### Author credits
You will be given credit in the `AUTHORS` file in the root of the repository and the 'About' pages inside the main application.
We will periodically update the contributors list inside `AUTHORS`.

You will be given credit in the [`AUTHORS`](AUTHORS) file in the root of the repository and the 'About' pages inside the main application.
We will periodically update the contributors list inside [`AUTHORS`](AUTHORS).
This is done by an automatic shell script `scripts/generate-authors.sh`.

If you want to add yourself directly with your pull request please run this script.
Expand All @@ -50,18 +60,21 @@ Your contribution is considered being made under [MIT license](https://tldrlegal


### Write a good commit message

See [good commit message] or [commit guidelines section of Pro Git].
The first line of your commit message is automatically taken as title for the pull-request.
The first line of your commit message is automatically taken as the title for the pull-request.
All other lines make up the body of the pull request. Add the words `fixes #xxx` to your PR to auto-close the corresponding issue.


### Test your code
We know that writing test cases causes a lot of time.

We know that writing test cases takes a lot of time.
Nevertheless, we rely on our test cases to ensure that a bug fix or a feature implementation doesn't break anything.
In case you do not have time to add a test case, we nevertheless ask you to run `gradlew check` to ensure that your change doesn't break anything else.
In case you do not have time to add a test case, we nevertheless ask you to at least run `gradlew check` to ensure that your change doesn't break anything else.


### When adding a library

Please try to use a version available at jCenter and add it to `build.gradle`.
In any case, describe the library at [external-libraries.txt](external-libraries.txt).
We need that information for our package maintainers (e.g., those of the [debian package](https://tracker.debian.org/pkg/jabref)).
Expand All @@ -71,6 +84,7 @@ You can see the result in `build\resources\main\help\en\About.html` or when clic


### When making an architectural decision

In case you add a library or do major code rewrites, we ask you to document your decision.
Recommended reading: <https://adr.github.io/>.

Expand All @@ -90,8 +104,9 @@ because <additional rationale>.


### When adding a new Localization.lang entry
Add new `Localization.lang("KEY")` to Java file.
Tests fail. In the test output a snippet is generated which must be added to the English translation file.

Add new `Localization.lang("KEY")` to a Java file.
The tests will fail. In the test output a snippet is generated, which must be added to the English translation file.

Example:

Expand All @@ -105,7 +120,7 @@ Expected :[]
Actual :[Opens\ JabRef's\ Twitter\ page (src\main\java\org\jabref\gui\JabRefFrame.java LANG)]
```

Add snippet to English translation file located at `src/main/resources/l10n/JabRef_en.properties`.
Add the above snippet to the English translation file located at `src/main/resources/l10n/JabRef_en.properties`.
[Crowdin](http://translate.jabref.org/) will automatically pick up the new string and add it to the other translations.

You can also directly run the specific test in your IDE.
Expand All @@ -114,10 +129,12 @@ Find more information in the [JabRef Wiki](https://github.com/JabRef/jabref/wiki


### Create a pull request

Create a pull request on GitHub.
For text inspirations, consider [How to write the perfect pull request](https://github.com/blog/1943-how-to-write-the-perfect-pull-request).

You can add the prefix `[WIP]` to indicate that the pull request is not yet complete, but you want to discuss something or inform about the current state of affairs.
If you want to indicate that a pull request is not yet complete **before** creating the pull request, you may consider creating a [draft pull request](https://github.blog/2019-02-14-introducing-draft-pull-requests/).
Alternatively, once the PR has been created, you can add the prefix `[WIP]` (which stands for "Work in Progress") to indicate that the pull request is not yet complete, but you want to discuss something or inform about the current state of affairs.


[commit guidelines section of Pro Git]: http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines
Expand Down
75 changes: 52 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins {
id "com.simonharrer.modernizer" version '1.8.0-1'
id 'me.champeau.gradle.jmh' version '0.4.8'
//id 'net.ltgt.errorprone' version '0.8.1'
id 'com.github.ben-manes.versions' version '0.25.0'
id 'com.github.ben-manes.versions' version '0.26.0'
id 'org.javamodularity.moduleplugin' version '1.5.0'
id 'org.openjfx.javafxplugin' version '0.0.8'
id 'org.beryx.jlink' version '2.16.0'
Expand All @@ -47,8 +47,8 @@ apply from: 'eclipse.gradle'

group = "org.jabref"
version = "5.0.0"
sourceCompatibility = 11
targetCompatibility = 11
sourceCompatibility = 12
targetCompatibility = 12
mainClassName = "$moduleName/org.jabref.JabRefLauncher"

// TODO: Ugly workaround to temporarily ignore build errors to dependencies of latex2unicode
Expand Down Expand Up @@ -102,7 +102,7 @@ configurations {
}

javafx {
version = "11.0.2"
version = "13"
modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.web', 'javafx.swing' ]
}

Expand Down Expand Up @@ -165,12 +165,12 @@ dependencies {
compile 'com.mashape.unirest:unirest-java:1.4.9'

compile 'org.slf4j:slf4j-api:2.0.0-alpha1'
compile group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: '3.0.0-20190915.182410-364'
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j18-impl', version: '3.0.0-20190915.182922-250'
compile group: 'org.apache.logging.log4j', name: 'log4j-plugins', version: '3.0.0-20190915.182837-57'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '3.0.0-20190915.182113-372'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '3.0.0-20190915.182215-368'
annotationProcessor group: 'org.apache.logging.log4j', name: 'log4j-core', version: '3.0.0-20190915.182215-368'
compile group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: '3.0.0-SNAPSHOT'
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j18-impl', version: '3.0.0-SNAPSHOT'
compile group: 'org.apache.logging.log4j', name: 'log4j-plugins', version: '3.0.0-SNAPSHOT'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '3.0.0-SNAPSHOT'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '3.0.0-SNAPSHOT'
annotationProcessor group: 'org.apache.logging.log4j', name: 'log4j-core', version: '3.0.0-SNAPSHOT'

compile 'de.undercouch:citeproc-java:1.0.1'

Expand Down Expand Up @@ -198,19 +198,18 @@ dependencies {
exclude module: "log4j-core"
}


testCompile 'io.github.classgraph:classgraph:4.8.47'
testCompile 'junit:junit:4.12'
testImplementation 'org.junit.jupiter:junit-jupiter:5.5.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.5.2'
testCompile 'org.junit.platform:junit-platform-launcher:1.5.2'

testCompile 'net.bytebuddy:byte-buddy-parent:1.10.1'
testRuntime group: 'org.apache.logging.log4j', name: 'log4j-core', version: '3.0.0-20190915.182215-368'
testRuntime group: 'org.apache.logging.log4j', name: 'log4j-jul', version: '3.0.0-20190915.182552-364'
testRuntime group: 'org.apache.logging.log4j', name: 'log4j-core', version: '3.0.0-SNAPSHOT'
testRuntime group: 'org.apache.logging.log4j', name: 'log4j-jul', version: '3.0.0-SNAPSHOT'
testCompile 'org.mockito:mockito-core:3.1.0'
//testCompile 'com.github.tomakehurst:wiremock:2.24.1'
testCompile ('org.reflections:reflections:0.9.11') {
exclude module: "jsr305"
}
testCompile 'org.xmlunit:xmlunit-core:2.6.3'
testCompile 'org.xmlunit:xmlunit-matchers:2.6.3'
testCompile 'com.tngtech.archunit:archunit-junit5-api:0.11.0'
Expand Down Expand Up @@ -507,14 +506,11 @@ modernizer {
}

// Release tasks
task generateFinalJabRefPS1File(type: Copy) {
from('buildres') {
include 'JabRef.ps1'
}
into 'build'
filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [jabRefJarFileName: jar.archiveName])
task deleteInstallerTemp(type: Delete) {
delete "$buildDir/installer"
}

jpackage.dependsOn deleteInstallerTemp
jlink {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
Expand Down Expand Up @@ -585,7 +581,9 @@ jlink {
'--app-version', "${project.version}",
'--win-upgrade-uuid', 'd636b4ee-6f10-451e-bf57-c89656780e36',
'--win-dir-chooser',
'--win-shortcut'
'--win-shortcut',
'--temp', "$buildDir/installer",
'--resource-dir', "${projectDir}/buildres/windows"
]
}

Expand All @@ -595,7 +593,9 @@ jlink {
]
installerOptions = [
'--vendor', 'JabRef',
'--app-version', "${project.version}"
'--app-version', "${project.version}",
//'--temp', "$buildDir/installer",
'--resource-dir', "${projectDir}/buildres/linux"
]
}

Expand All @@ -611,6 +611,35 @@ jlink {
}
}

if (OperatingSystem.current().isWindows()) {
tasks.jpackageImage.doLast {
copy {
from("${projectDir}/buildres/windows") {
include "jabref.json", "JabRefHost.bat", "JabRefHost.ps1"
}
into "$buildDir/distribution/JabRef"
}
}
}

if (OperatingSystem.current().isLinux()) {
tasks.jpackageImage.doLast {
copy {
from("${projectDir}/buildres/linux") {
include "org.jabref.jabref.json", "jabrefHost.py"
}
into "$buildDir/distribution/JabRef/lib"
}
}
}

// Delete unnecessary folder in application image
// TODO: Remove this workaround as soon as https://github.com/beryx/badass-jlink-plugin/issues/51 is fixed
task deleteModsFolder(type: Delete) {
delete "$buildDir/distribution/JabRef/app/mods"
}
deleteModsFolder.shouldRunAfter jpackageImage

jmh {
warmupIterations = 5
iterations = 10
Expand Down
Loading

0 comments on commit 7a39096

Please sign in to comment.