From a3f8f37ada6d118c1ae6a9650a88a0f3d32c7926 Mon Sep 17 00:00:00 2001 From: Kenneth Langedal <Kenneth.Langedal@hotmail.com> Date: Mon, 14 Dec 2020 10:59:17 +0100 Subject: [PATCH] Updated lwjgl backend version --- pom.xml | 9 ++++----- src/main/java/inf112/skeleton/app/Main.java | 14 ++++++-------- src/test/java/inf112/skeleton/app/AppTest.java | 8 +++----- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/pom.xml b/pom.xml index cdae422..86d8013 100644 --- a/pom.xml +++ b/pom.xml @@ -14,8 +14,7 @@ <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> + <maven.compiler.release>9</maven.compiler.release> </properties> <dependencies> @@ -28,15 +27,15 @@ <dependency> <groupId>com.badlogicgames.gdx</groupId> - <artifactId>gdx-backend-lwjgl</artifactId> + <artifactId>gdx-platform</artifactId> <version>1.9.10</version> + <classifier>natives-desktop</classifier> </dependency> <dependency> <groupId>com.badlogicgames.gdx</groupId> - <artifactId>gdx-platform</artifactId> + <artifactId>gdx-backend-lwjgl3</artifactId> <version>1.9.10</version> - <classifier>natives-desktop</classifier> </dependency> <dependency> diff --git a/src/main/java/inf112/skeleton/app/Main.java b/src/main/java/inf112/skeleton/app/Main.java index 68266b2..f176d96 100644 --- a/src/main/java/inf112/skeleton/app/Main.java +++ b/src/main/java/inf112/skeleton/app/Main.java @@ -1,16 +1,14 @@ package inf112.skeleton.app; -import com.badlogic.gdx.backends.lwjgl.LwjglApplication; -import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; - +import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; +import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; public class Main { public static void main(String[] args) { - LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration(); - cfg.title = "hello-world"; - cfg.width = 480; - cfg.height = 320; + Lwjgl3ApplicationConfiguration cfg = new Lwjgl3ApplicationConfiguration(); + cfg.setTitle("hello-world"); + cfg.setWindowedMode(480, 320); - new LwjglApplication(new HelloWorld(), cfg); + new Lwjgl3Application(new HelloWorld(), cfg); } } \ No newline at end of file diff --git a/src/test/java/inf112/skeleton/app/AppTest.java b/src/test/java/inf112/skeleton/app/AppTest.java index fedfe2a..18d3d59 100644 --- a/src/test/java/inf112/skeleton/app/AppTest.java +++ b/src/test/java/inf112/skeleton/app/AppTest.java @@ -6,14 +6,12 @@ import org.junit.Test; /** * Unit test for simple App. */ -public class AppTest -{ +public class AppTest { /** * Rigorous Test :-) */ @Test - public void shouldAnswerWithTrue() - { - assertTrue( true ); + public void shouldAnswerWithTrue() { + assertTrue(true); } } -- GitLab