From 30b0cd7eb7970f9037f314acf33d1886fcd7d8c7 Mon Sep 17 00:00:00 2001 From: Speiger Date: Fri, 19 May 2023 22:08:59 +0200 Subject: [PATCH] Ported to java19 (because gradle doesn't support 20 yet) --- .classpath | 36 +++++++++--------- .project | 2 +- build.gradle | 38 +++++++++---------- gradle/wrapper/gradle-wrapper.properties | 2 +- .../assets/impl/ZipAssetPackage.java | 6 +-- 5 files changed, 42 insertions(+), 42 deletions(-) diff --git a/.classpath b/.classpath index 467ef2f..80327ad 100644 --- a/.classpath +++ b/.classpath @@ -1,18 +1,18 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/.project b/.project index 953ae90..04ec89c 100644 --- a/.project +++ b/.project @@ -1,6 +1,6 @@ - Project-Engine-SimpleJavaEngine + GameProject-SimpleJavaEngine diff --git a/build.gradle b/build.gradle index 7482966..51a612a 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ eclipse { downloadSources = true } } -sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' +sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaLanguageVersion.of(19) repositories { mavenCentral() maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } @@ -22,7 +22,7 @@ repositories { task srcJar(type: Jar) { from sourceSets.main.allSource - classifier = 'sources' + archiveClassifier = 'sources' from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) @@ -44,26 +44,26 @@ jar{ dependencies { //LWJGL 3 - compile platform("org.lwjgl:lwjgl-bom:$lwjglVersion") + implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion") - compile "org.lwjgl:lwjgl" - compile "org.lwjgl:lwjgl-glfw" - compile "org.lwjgl:lwjgl-jemalloc" - compile "org.lwjgl:lwjgl-openal" - compile "org.lwjgl:lwjgl-opengl" - compile "org.lwjgl:lwjgl-stb" - compile "org.lwjgl:lwjgl-nfd" - compile "org.lwjgl:lwjgl::$lwjglNatives" - compile "org.lwjgl:lwjgl-glfw::$lwjglNatives" - compile "org.lwjgl:lwjgl-jemalloc::$lwjglNatives" - compile "org.lwjgl:lwjgl-openal::$lwjglNatives" - compile "org.lwjgl:lwjgl-opengl::$lwjglNatives" - compile "org.lwjgl:lwjgl-stb::$lwjglNatives" - compile "org.lwjgl:lwjgl-nfd::$lwjglNatives" + implementation "org.lwjgl:lwjgl" + implementation "org.lwjgl:lwjgl-glfw" + implementation "org.lwjgl:lwjgl-jemalloc" + implementation "org.lwjgl:lwjgl-openal" + implementation "org.lwjgl:lwjgl-opengl" + implementation "org.lwjgl:lwjgl-stb" + implementation "org.lwjgl:lwjgl-nfd" + implementation "org.lwjgl:lwjgl::$lwjglNatives" + implementation "org.lwjgl:lwjgl-glfw::$lwjglNatives" + implementation "org.lwjgl:lwjgl-jemalloc::$lwjglNatives" + implementation "org.lwjgl:lwjgl-openal::$lwjglNatives" + implementation "org.lwjgl:lwjgl-opengl::$lwjglNatives" + implementation "org.lwjgl:lwjgl-stb::$lwjglNatives" + implementation "org.lwjgl:lwjgl-nfd::$lwjglNatives" //Gson - compile 'com.google.code.gson:gson:2.8.6' + implementation 'com.google.code.gson:gson:2.8.6' //Primitive Collections - compile 'de.speiger:Primitive-Collections:0.7.0' + implementation 'de.speiger:Primitive-Collections:0.7.0' } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a4b4429..fae0804 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/speiger/src/coreengine/assets/impl/ZipAssetPackage.java b/src/main/java/speiger/src/coreengine/assets/impl/ZipAssetPackage.java index 088354e..dd2f8a6 100644 --- a/src/main/java/speiger/src/coreengine/assets/impl/ZipAssetPackage.java +++ b/src/main/java/speiger/src/coreengine/assets/impl/ZipAssetPackage.java @@ -60,7 +60,7 @@ public class ZipAssetPackage implements IAssetPackage protected FileSystem getReference() throws IOException { usedReferences.getAndIncrement(); - if(cache == null) cache = FileSystems.newFileSystem(baseFolder, null); + if(cache == null) cache = FileSystems.newFileSystem(baseFolder); return cache; } @@ -68,7 +68,7 @@ public class ZipAssetPackage implements IAssetPackage public List getDomains() { List domains = new ObjectArrayList<>(); - try(FileSystem system = FileSystems.newFileSystem(baseFolder, null)) + try(FileSystem system = FileSystems.newFileSystem(baseFolder)) { try(DirectoryStream dirs = Files.newDirectoryStream(system.getPath("assets"))) { @@ -98,7 +98,7 @@ public class ZipAssetPackage implements IAssetPackage @Override public void getAllAssets(AssetLocation folder, Predicate fileNames, int maxDepth, Collection result) { - try(FileSystem system = FileSystems.newFileSystem(baseFolder, null)) + try(FileSystem system = FileSystems.newFileSystem(baseFolder)) { Path start = system.getPath(folder.getActualLocation()); if(Files.notExists(start)) return;