diff --git a/.classpath b/.classpath
index 78b60bd14..2bf1919a4 100644
--- a/.classpath
+++ b/.classpath
@@ -1,25 +1,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
index 80a5df502..daecd4083 100644
--- a/.settings/org.eclipse.jdt.core.prefs
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -2,13 +2,13 @@ eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
diff --git a/.travis.yml b/.travis.yml
index 77e3b34e9..45b2b5661 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,8 +3,10 @@ install: true
before_install:
- chmod +x gradlew
- sudo apt-get -y install at-spi2-core
-
-jdk: openjdk11
+ - sudo apt-get -y install openjfx
+jdk:
+ - openjdk11
+ - openjdk8
git:
depth: false
diff --git a/build-maven.gradle b/build-maven.gradle
index 4c10a9e2e..4c0d2ae35 100644
--- a/build-maven.gradle
+++ b/build-maven.gradle
@@ -1,7 +1,23 @@
+buildscript {
+ dependencies {
+ if(JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
+ classpath "org.openjfx:javafx-plugin:0.0.8"
+ }
+ }
+}
+
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
+if(JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
+ apply plugin: 'org.openjfx.javafxplugin'
+ javafx {
+ version = "11.0.2"
+ modules = ['javafx.media', 'javafx.swing']
+ }
+}
+
sourceSets {
main.java.srcDir "src"
main.resources.srcDir "resources"
@@ -36,6 +52,7 @@ dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.4.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.4.1'
testImplementation 'org.mockito:mockito-core:2.25.1'
+
}
test {
@@ -93,6 +110,8 @@ tasks.withType(JavaCompile) {
group = "de.gurkenlabs"
archivesBaseName = "litiengine"
version = "0.4.19"
+sourceCompatibility = "8"
+targetCompatibility = "8"
publishing {
publications {
diff --git a/build.gradle b/build.gradle
index a75704f7f..497557768 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,13 +2,26 @@ buildscript {
repositories {
mavenCentral()
}
+ dependencies {
+ if(JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
+ classpath "org.openjfx:javafx-plugin:0.0.8"
+ }
+ }
}
- plugins {
+plugins {
id 'com.stehno.natives' version '0.3.1'
id 'org.sonarqube' version '2.8'
}
+if(JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
+ apply plugin: 'org.openjfx.javafxplugin'
+ javafx {
+ version = "11.0.2"
+ modules = ['javafx.media', 'javafx.swing']
+ }
+}
+
natives {
configurations = ['runtimeClasspath']
outputDir = 'libs'
@@ -19,6 +32,8 @@ apply plugin: 'jacoco'
archivesBaseName = "litiengine"
version = "v0.4.19-alpha"
+sourceCompatibility = "8"
+targetCompatibility = "8"
sourceSets {
main.java.srcDir "src"
diff --git a/src/de/gurkenlabs/litiengine/resources/Resources.java b/src/de/gurkenlabs/litiengine/resources/Resources.java
index bb4bae00b..ee3324297 100644
--- a/src/de/gurkenlabs/litiengine/resources/Resources.java
+++ b/src/de/gurkenlabs/litiengine/resources/Resources.java
@@ -156,7 +156,7 @@ public static Blueprints blueprints() {
*
* @return The VideoManager resource container.
*
- * @see VideoManager
+ * @see de.gurkenlabs.litiengine.video.VideoManager
*/
public static Videos videos() {
return videos;
diff --git a/src/de/gurkenlabs/litiengine/video/VideoManagerImpl.java b/src/de/gurkenlabs/litiengine/video/VideoManagerImpl.java
index 5947019de..e864dd7ed 100644
--- a/src/de/gurkenlabs/litiengine/video/VideoManagerImpl.java
+++ b/src/de/gurkenlabs/litiengine/video/VideoManagerImpl.java
@@ -61,6 +61,7 @@ private synchronized void setMedia(Media media) {
Scene scene = new Scene(root, media.getWidth(), media.getHeight());
mediaView.autosize();
panel.setScene(scene);
+ mediaView.getMediaPlayer().setOnReady(() -> panel.setSize(media.getWidth(), media.getHeight()));
});
}