Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] experimental jdk11 build #4953

Closed
wants to merge 18 commits into from
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
jobs:
downloadinstall4j:
docker:
- image: circleci/openjdk:8-jdk
- image: circleci/openjdk:11.0.3-jdk-stretch
steps:
- checkout
- run: git submodule sync
Expand All @@ -23,10 +23,10 @@ jobs:

buildDev:
docker:
- image: circleci/openjdk:8-jdk
- image: circleci/openjdk:11.03-jdk-stretch
steps:
- restore_cache:
key: dependency-cache
key: dependency-cache-new
- checkout
- run: git submodule sync
- run: git submodule update --init
Expand All @@ -36,7 +36,7 @@ jobs:
- run: install4j7/bin/install4jc --verbose --license=$INSTALL4J_KEY
- run: ./gradlew -Pdev=true -Pinstall4jDir="install4j7" release --stacktrace
- save_cache:
key: dependency-cache
key: dependency-cache-new
paths:
- "~/.gradle"
- store_artifacts:
Expand All @@ -46,10 +46,10 @@ jobs:

buildRelease:
docker:
- image: circleci/openjdk:8-jdk
- image: circleci/openjdk:11.03-jdk-stretch
steps:
- restore_cache:
key: dependency-cache
key: dependency-cache-new
- checkout
- run: git submodule sync
- run: git submodule update --init
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ before_install:

install: true

jdk:
- openjdk11

before_script:
- psql -c 'create database jabref;' -U postgres
- mysql -u root -e 'create database jabref'
Expand Down
23 changes: 16 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ plugins {
id 'com.github.johnrengelman.shadow' version '5.0.0'
id "com.simonharrer.modernizer" version '1.6.0-1'
id 'me.champeau.gradle.jmh' version '0.4.8'
id 'net.ltgt.errorprone' version '0.8'
// id 'net.ltgt.errorprone' version '0.8'
id 'com.github.ben-manes.versions' version '0.21.0'
id "org.openjfx.javafxplugin" version "0.0.7"
}

// use the gradle build scan feature: https://scans.gradle.com/get-started
Expand All @@ -46,13 +47,13 @@ group = "org.jabref"
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
sourceCompatibility = 11
targetCompatibility = 11
mainClassName = "org.jabref.JabRefMain"

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

sourceSets {
main {
Expand Down Expand Up @@ -83,7 +84,13 @@ repositories {
}

configurations {
errorprone
//errorprone
}


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

dependencies {
Expand Down Expand Up @@ -136,7 +143,7 @@ dependencies {
compile 'com.jfoenix:jfoenix:8.0.8'

// Cannot be updated to 9.*.* until Jabref works with Java 9
compile 'org.controlsfx:controlsfx:8.40.15-SNAPSHOT'
compile 'org.controlsfx:controlsfx:11.0.0'

compile 'org.jsoup:jsoup:1.11.3'
compile 'com.mashape.unirest:unirest-java:1.4.9'
Expand All @@ -152,7 +159,7 @@ dependencies {

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

errorproneJavac 'com.google.errorprone:javac:1.8.0-u20'
//errorproneJavac 'com.google.errorprone:javac:1.8.0-u20'

compile group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '2.3.1'
compile group: 'com.microsoft.azure', name: 'applicationinsights-logging-log4j2', version: '2.3.1'
Expand All @@ -174,7 +181,9 @@ dependencies {
testCompile "org.testfx:testfx-junit5:4.0.+"

checkstyle 'com.puppycrawl.tools:checkstyle:8.20'
compile 'javax.xml.bind:jaxb-api:2.2.4'
xjc 'com.sun.xml.bind:jaxb-xjc:2.2.4-1'

jython 'org.python:jython-standalone:2.7.1'
}

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/jabref/gui/actions/ActionFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
import org.jabref.gui.keyboard.KeyBindingRepository;
import org.jabref.model.strings.StringUtil;

import com.sun.javafx.scene.control.skin.ContextMenuContent;
import javafx.scene.control.skin.ContextMenuContent;
import javafx.scene.control.skin.ContextMenuSkin;
import de.saxsys.mvvmfx.utils.commands.Command;
import org.controlsfx.control.action.ActionUtils;
import org.fxmisc.easybind.EasyBind;
Expand Down Expand Up @@ -57,7 +58,7 @@ private static void setGraphic(MenuItem node, Action action) {
* should not be used since it's marked as deprecated.
*/
private static Label getAssociatedNode(MenuItem menuItem) {
ContextMenuContent.MenuItemContainer container = (ContextMenuContent.MenuItemContainer) menuItem.impl_styleableGetNode();
ContextMenuContent.MenuItemContainer container = (ContextMenuContent.MenuItemContainer) menuItem.getNode();

if (container == null) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;

import com.sun.javafx.scene.control.skin.TextAreaSkin;
import javafx.scene.control.skin.TextAreaSkin;

public class EditorTextArea extends TextArea implements Initializable, ContextMenuAddable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;

import com.sun.javafx.scene.control.skin.TextFieldSkin;
import javafx.scene.control.skin.TextFieldSkin;

public class EditorTextField extends TextField implements Initializable, ContextMenuAddable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public Optional<KeyBinding> mapToKeyBinding(KeyEvent keyEvent) {
}

public Optional<KeyBinding> mapToKeyBinding(java.awt.event.KeyEvent keyEvent) {
Optional<KeyCode> keyCode = Arrays.stream(KeyCode.values()).filter(k -> k.impl_getCode() == keyEvent.getKeyCode()).findFirst();
Optional<KeyCode> keyCode = Arrays.stream(KeyCode.values()).filter(k -> k.getCode()== keyEvent.getKeyCode()).findFirst();
if (keyCode.isPresent()) {
KeyEvent event = new KeyEvent(keyEvent.getSource(), null, KeyEvent.KEY_PRESSED, "", "", keyCode.get(), keyEvent.isShiftDown(), keyEvent.isControlDown(), keyEvent.isAltDown(), keyEvent.isMetaDown());
return mapToKeyBinding(event);
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/jabref/gui/util/MappedList.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,9 @@ public A get(int index) {
public int size() {
return backingList.size();
}

@Override
public int getViewIndex​(int index) {
return ((TransformationList<A, B>) backingList).getViewIndex​(index);
}
}
5 changes: 5 additions & 0 deletions src/main/java/org/jabref/gui/util/UiThreadList.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@ public T get(int index) {
public int size() {
return getSource().size();
}

@Override
public int getViewIndex​(int index) {
return getSource().getViewIndex​(index);
}
}