Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into installeruninstall
Browse files Browse the repository at this point in the history
* upstream/master: (468 commits)
  Fix error prone warnings (#4290)
  Fix freeze on import into current library (#4299)
  Upgrade gradle to 4.10 update xmlunit and postgres
  update xmlunit-matchers from 2.6.0 -> 2.6.1
  update gradle build-scan from 1.15.2 -> 1.16
  checkstyle
  execute changes only if disk db present
  Fix Export to clipbaord action (#4286)
  fix npe in Merge entries dialog
  Add minimal height for entry editor (#4283)
  Fix exceptions when trying to change settings (#4284)
  Added a comment for the purpose of the class (#4282)
  Fix NPE when importing from CLI (#4281)
  Fix display of key patterns
  convert bibtexkeypatterndlg to javafx as well (#4277)
  Style preference sections using css
  Fix a few style issues
  Changed the behavior of the field formatting dialog (#4275)
  Fix checkbox display
  Remove small font size
  ...
  • Loading branch information
Siedlerchr committed Aug 29, 2018
2 parents ae2f2ac + ce713ca commit 03714d1
Show file tree
Hide file tree
Showing 864 changed files with 25,730 additions and 35,057 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ after_failure:
branches:
only:
- master
- maintable-beta

# cache gradle dependencies
# https://docs.travis-ci.com/user/languages/java#Caching
Expand All @@ -70,3 +71,4 @@ cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

426 changes: 65 additions & 361 deletions CHANGELOG.md

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Understanding the basics
We welcome contributions to JabRef and encourage to create a fork, clone, **create a new branch** (such as `fix-for-issue-121`), **work on the new branch — not master**, and create a pull request.
Be sure to create a **separate branch** for each improvement you implement.
Take a look at GitHub's excellent [help documentation] for a detailed explanation and the explanation of [Feature Branch Workflow](https://de.atlassian.com/git/tutorials/comparing-workflows#feature-branch-workflow) for the idea behind this kind of development.
Take a look at GitHub's excellent overview on the [GitHub flow](https://guides.github.com/introduction/flow/index.html) and their [pull request help documentation](https://help.github.com/articles/about-pull-requests/) for a detailed explanation and the explanation of [Feature Branch Workflow](https://de.atlassian.com/git/tutorials/comparing-workflows#feature-branch-workflow) for the idea behind this kind of development.

We also have [code howtos](https://github.com/JabRef/jabref/wiki/Code-Howtos) and [guidelines for setting up a local workspace](https://github.com/JabRef/jabref/wiki/Guidelines-for-setting-up-a-local-workspace).

Expand Down Expand Up @@ -118,5 +118,4 @@ You can add the prefix `[WIP]` to indicate that the pull request is not yet comp


[commit guidelines section of Pro Git]: http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines
[good commit message]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[help documentation]: https://help.github.com/articles/about-pull-requests/
[good commit message]: https://github.com/joelparkerhenderson/git_commit_message
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright © 2003-2016 [JabRef Authors](https://github.com/JabRef/jabref/blob/master/AUTHORS)
Copyright © 2003-2018 [JabRef Authors](https://github.com/JabRef/jabref/blob/master/AUTHORS)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
151 changes: 89 additions & 62 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ buildscript {
}

plugins {
id 'com.gradle.build-scan' version '1.11'
id 'com.install4j.gradle' version '7.0.4'
id 'com.github.johnrengelman.shadow' version '2.0.2'
id 'com.gradle.build-scan' version '1.16'
id 'com.install4j.gradle' version '7.0.6'
id 'com.github.johnrengelman.shadow' version '2.0.4'
id "de.sebastianboegl.shadow.transformer.log4j" version "2.1.1"
id "com.simonharrer.modernizer" version '1.6.0-1'
id 'me.champeau.gradle.jmh' version '0.4.3'
id 'net.ltgt.errorprone' version '0.0.13'
id 'com.github.ben-manes.versions' version '0.17.0'
id 'me.champeau.gradle.jmh' version '0.4.7'
id 'net.ltgt.errorprone' version '0.0.16'
id 'com.github.ben-manes.versions' version '0.20.0'
}

// use the gradle build scan feature: https://scans.gradle.com/get-started
Expand All @@ -44,15 +44,15 @@ apply from: 'localization.gradle'
apply from: 'xjc.gradle'

group = "org.jabref"
version = "4.3-dev"
project.ext.threeDotVersion = "4.2.0.1"
version = "5.0-dev"
project.ext.threeDotVersion = "5.0.0.0"
project.ext.install4jDir = hasProperty("install4jDir") ? getProperty("install4jDir") : (OperatingSystem.current().isWindows() ? 'C:/Program Files/install4j7' : 'install4j7')
sourceCompatibility = 1.8
targetCompatibility = 1.8
mainClassName = "org.jabref.JabRefMain"

// These are the Java version requirements we will check on each start of JabRef
ext.minRequiredJavaVersion = "1.8.0_144"
ext.minRequiredJavaVersion = "1.8.0_171"
ext.allowJava9 = false

sourceSets {
Expand All @@ -65,6 +65,14 @@ sourceSets {
srcDirs = ["src/main/java", "src/main/resources"]
}
}
test{
java {
srcDirs = ["src/test/java"]
}
resources {
srcDirs = ["src/test/resources"]
}
}
}

repositories {
Expand All @@ -78,20 +86,22 @@ repositories {
configurations {
antlr3
antlr4
errorprone
}

dependencies {
// Include all jar-files in the 'lib' folder as dependencies
compile fileTree(dir: 'lib', includes: ['*.jar'])

compile 'com.jgoodies:jgoodies-common:1.8.1'
compile 'com.jgoodies:jgoodies-forms:1.9.0'

compile 'org.apache.pdfbox:pdfbox:2.0.9'
compile 'org.apache.pdfbox:fontbox:2.0.9'
compile 'org.apache.pdfbox:xmpbox:2.0.9'
compile 'org.apache.pdfbox:pdfbox:2.0.11'
compile 'org.apache.pdfbox:fontbox:2.0.11'
compile 'org.apache.pdfbox:xmpbox:2.0.11'

// required for reading write-protected PDFs - see https://github.com/JabRef/jabref/pull/942#issuecomment-209252635
compile 'org.bouncycastle:bcprov-jdk15on:1.59'
compile 'org.bouncycastle:bcprov-jdk15on:1.60'

compile 'commons-cli:commons-cli:1.4'

Expand All @@ -100,7 +110,7 @@ dependencies {
compile "org.libreoffice:ridl:5.4.2"
compile "org.libreoffice:unoil:5.4.2"

compile 'com.github.bkromhout:java-diff-utils:2.1.1'
compile 'io.github.java-diff-utils:java-diff-utils:2.2.0'
compile 'info.debatty:java-string-similarity:1.1.0'

antlr3 'org.antlr:antlr:3.5.2'
Expand All @@ -109,23 +119,23 @@ dependencies {
antlr4 'org.antlr:antlr4:4.7.1'
compile 'org.antlr:antlr4-runtime:4.7.1'

// VersionEye states that 6.0.5 is the most recent version, but http://dev.mysql.com/downloads/connector/j/ shows that as "Development Release"
compile 'mysql:mysql-connector-java:5.1.46'
compile 'mysql:mysql-connector-java:8.0.12'

compile 'com.impossibl.pgjdbc-ng:pgjdbc-ng:0.7.1'
compile 'org.postgresql:postgresql:42.2.5'

compile 'net.java.dev.glazedlists:glazedlists_java15:1.9.1'

compile 'com.google.guava:guava:25.0-jre'
compile 'com.google.guava:guava:26.0-jre'

// JavaFX stuff
compile 'com.airhacks:afterburner.fx:1.7.0'
compile 'de.codecentric.centerdevice:javafxsvg:1.3.0'
compile 'de.jensd:fontawesomefx-materialdesignfont:1.7.22-4'
compile 'de.saxsys:mvvmfx-validation:1.7.0'
compile 'de.saxsys:mvvmfx:1.7.0'
compile 'org.fxmisc.easybind:easybind:1.0.3'
compile 'org.fxmisc.flowless:flowless:0.6.1'
compile 'org.fxmisc.richtext:richtextfx:0.9.0'
compile 'org.fxmisc.richtext:richtextfx:0.9.1'
compile 'com.sibvisions.external.jvxfx:dndtabpane:0.1'
compile 'javax.inject:javax.inject:1'

// Cannot be updated to 9.*.* until Jabref works with Java 9
compile 'org.controlsfx:controlsfx:8.40.15-SNAPSHOT'
Expand All @@ -135,10 +145,10 @@ dependencies {

// >1.8.0-beta is required for java 9 compatibility
compile 'org.slf4j:slf4j-api:1.8.0-beta2'
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.11.0'
compile 'org.apache.logging.log4j:log4j-jcl:2.11.0'
compile 'org.apache.logging.log4j:log4j-api:2.11.0'
compile 'org.apache.logging.log4j:log4j-core:2.11.0'
compile 'org.apache.logging.log4j:log4j-slf4j18-impl:2.11.1'
compile 'org.apache.logging.log4j:log4j-jcl:2.11.1'
compile 'org.apache.logging.log4j:log4j-api:2.11.1'
compile 'org.apache.logging.log4j:log4j-core:2.11.1'

// need to use snapshots as the stable version is from 2013 and doesn't support v1.0.1 CitationStyles
compile 'org.citationstyles:styles:1.0.1-SNAPSHOT'
Expand All @@ -147,27 +157,30 @@ dependencies {

compile 'com.github.tomtung:latex2unicode_2.12:0.2.2'

compile group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '2.0.2'
compile group: 'com.microsoft.azure', name: 'applicationinsights-logging-log4j2', version: '2.0.2'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.2.0-RC1'
testCompile 'org.junit.jupiter:junit-jupiter-params:5.2.0-RC1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.2.0-RC1'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.2.0-RC1'
testCompile 'org.junit.platform:junit-platform-launcher:1.2.0-RC1'
testRuntime 'org.apache.logging.log4j:log4j-core:2.11.0'
testRuntime 'org.apache.logging.log4j:log4j-jul:2.11.0'
testCompile 'org.mockito:mockito-core:2.18.3'
testCompile 'com.github.tomakehurst:wiremock:2.17.0'
errorprone 'com.google.errorprone:error_prone_core:2.3.1'

compile group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '2.1.2'
compile group: 'com.microsoft.azure', name: 'applicationinsights-logging-log4j2', version: '2.1.2'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.0-RC1'
testCompile 'org.junit.jupiter:junit-jupiter-params:5.3.0-RC1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.0-RC1'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.3.0-RC1'
testCompile 'org.junit.platform:junit-platform-launcher:1.3.0-RC1'
testCompile 'org.junit-pioneer:junit-pioneer:0.1.2'
testRuntime 'org.apache.logging.log4j:log4j-core:2.11.1'
testRuntime 'org.apache.logging.log4j:log4j-jul:2.11.1'
testCompile 'org.mockito:mockito-core:2.21.0'
testCompile 'com.github.tomakehurst:wiremock:2.18.0'
testCompile 'org.assertj:assertj-swing-junit:3.8.0'
testCompile 'org.reflections:reflections:0.9.11'
testCompile 'org.xmlunit:xmlunit-core:2.6.0'
testCompile 'org.xmlunit:xmlunit-matchers:2.6.0'
testCompile 'com.tngtech.archunit:archunit-junit:0.5.0'
testCompile 'org.xmlunit:xmlunit-core:2.6.2'
testCompile 'org.xmlunit:xmlunit-matchers:2.6.2'
testCompile 'com.tngtech.archunit:archunit-junit:0.8.3'
testCompile "org.testfx:testfx-core:4.0.+"
testCompile "org.testfx:testfx-junit:4.0.+"
testCompile "org.testfx:testfx-junit5:4.0.+"

checkstyle 'com.puppycrawl.tools:checkstyle:8.9'
checkstyle 'com.puppycrawl.tools:checkstyle:8.12'
}

jacoco {
Expand All @@ -178,32 +191,30 @@ dependencyUpdates {
outputFormatter = "json"
}

//We have to use this as long as junit-pioneer has no official release
dependencyUpdates.revision = 'integration'

// We have some dependencies which cannot be updated due to various reasons.
dependencyUpdates.resolutionStrategy = {
componentSelection {
withModule("org.controlsfx:controlsfx") { ComponentSelection selection ->
if (selection.candidate.version ==~ /9.*/) { // Reject version 9 or higher
selection.reject("Cannot be updated to 9.*.* until Jabref works with Java 9")
}
}
withModule("de.jensd:fontawesomefx-materialdesignfont") { ComponentSelection selection ->
if (selection.candidate.version ==~ /2.*/) {
selection.reject("Cannot be upgraded to version 2")
componentSelection { rules ->
rules.all { ComponentSelection selection ->
if ( selection.candidate.module!="javax.inject" && selection.candidate.version ==~ /[0-9].*SNAPSHOT/ ) {
selection.reject("Ignore SNAPSHOT releases")
}
}
withModule("mysql:mysql-connector-java") { ComponentSelection selection ->
if (selection.candidate.version ==~ /[6-9].*/) {
selection.reject("http://dev.mysql.com/downloads/connector/j/ lists the version 5.* as last stable version.")
rules.withModule("org.controlsfx:controlsfx") { ComponentSelection selection ->
if (selection.candidate.version ==~ /9.*/) { // Reject version 9 or higher
selection.reject("Cannot be updated to 9.*.* until Jabref works with Java 9")
}
}
withModule("org.jacoco:org.jacoco.agent") { ComponentSelection selection ->
if (selection.candidate.version ==~ /0.8.*/) {
selection.reject("As a native plugin we cannot control the actual version of jacoco. This dependency should be hidden.")
rules.withModule("com.github.tomtung:latex2unicode_2.12") { ComponentSelection selection ->
if (selection.candidate.version ==~ /0.2.2/) { // Reject version higher than 2.0.2
selection.reject("Cannot be updated to 0.2.4 until JabRef is prepared for it")
}
}
withModule("org.jacoco:org.jacoco.ant") { ComponentSelection selection ->
if (selection.candidate.version ==~ /0.8.*/) {
selection.reject("As a native plugin we cannot control the actual version of jacoco. This dependency should be hidden.")
rules.withModule("de.jensd:fontawesomefx-materialdesignfont") { ComponentSelection selection ->
if (selection.candidate.version ==~ /2.*/) {
selection.reject("Cannot be upgraded to version 2")
}
}
}
Expand Down Expand Up @@ -311,7 +322,7 @@ test {
useJUnitPlatform {
excludeTags 'DatabaseTest', 'FetcherTest', 'GUITest', 'org.jabref.testutils.category.FetcherTest', 'org.jabref.testutils.category.GUITest'
}

testLogging {
// set options for log level LIFECYCLE
events "failed"
Expand Down Expand Up @@ -372,7 +383,7 @@ checkstyle {
// do not use other packages for checkstyle, excluding gen(erated) sources
checkstyleMain.source = "src/main/java"
toolVersion = '8.5'

// do not perform checkstyle checks by default
sourceSets = []
}
Expand Down Expand Up @@ -484,3 +495,19 @@ jmh {
iterations = 10
fork = 2
}

// Source: https://stackoverflow.com/a/44168582/873282
task downloadDependencies {
description "Pre-downloads *most* dependencies"
doLast {
configurations.getAsMap().each { name, config ->
println "Retrieving dependencies for $name"
try {
config.files
} catch (e) {
// some cannot be resolved, just log them
project.logger.info e.message
}
}
}
}
18 changes: 7 additions & 11 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,14 @@ dependencies:
- install4j7/bin/install4jc --verbose --license=$INSTALL4J_KEY
#--win-keystore-password $CERTIFICATE_PW --mac-keystore-password $CERTIFICATE_PW
override:
# We do this to decrease build time by using CircleCI's cache. See https://discuss.circleci.com/t/effective-caching-for-gradle/540 for a longer motivation.
- ./gradlew compileJava
- ./gradlew downloadDependencies
cache_directories:
- "~/.install4j7"
- "~/downloads"

test:
override:
- ./gradlew -Pdev=true -Pinstall4jDir="install4j7" release --stacktrace
post:
# save test reports as build artifacts
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
- "true"

deployment:
release:
Expand All @@ -34,18 +29,19 @@ deployment:
commands:
# we have to do a clean build as changing gradle's "project.version" does not lead to a rebuild of resources (mirroring project.version)
- ./gradlew -Pinstall4jDir="install4j7" clean release --stacktrace
# upload at all circumstances
- scripts/upload-to-builds.jabref.org.sh
# if upload fails, it is accepted; CircleCI provides deep links to the binaries as fallback.
- timeout 580 scripts/upload-to-builds.jabref.org.sh || exit 0
# generate dependency information. This is not published on our buid server, but can be collected as logged in user at CircleCI
- ./gradlew dependencyUpdates -Drevision=release -DoutputFormatter=json -DoutputDir=build/releases
development:
# match all branches; this is executed, if "release" is not matched - see https://circleci.com/docs/configuration/
branch: /.*/
commands:
# generate binaries
- ./gradlew -Pdev=true -Pinstall4jDir="install4j7" release --stacktrace
# if upload fails, it is accepted; CircleCI provides deep links to the binaries as fallback
- timeout 580 scripts/upload-to-builds.jabref.org.sh || exit 0



general:
artifacts:
- "build/releases"
Loading

0 comments on commit 03714d1

Please sign in to comment.