Ported to java19 (because gradle doesn't support 20 yet)
This commit is contained in:
parent
b42e680b8a
commit
30b0cd7eb7
|
@ -12,7 +12,7 @@
|
|||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-19/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
||||
|
|
2
.project
2
.project
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Project-Engine-SimpleJavaEngine</name>
|
||||
<name>GameProject-SimpleJavaEngine</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
|
|
38
build.gradle
38
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'
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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<String> getDomains()
|
||||
{
|
||||
List<String> domains = new ObjectArrayList<>();
|
||||
try(FileSystem system = FileSystems.newFileSystem(baseFolder, null))
|
||||
try(FileSystem system = FileSystems.newFileSystem(baseFolder))
|
||||
{
|
||||
try(DirectoryStream<Path> dirs = Files.newDirectoryStream(system.getPath("assets")))
|
||||
{
|
||||
|
@ -98,7 +98,7 @@ public class ZipAssetPackage implements IAssetPackage
|
|||
@Override
|
||||
public void getAllAssets(AssetLocation folder, Predicate<String> fileNames, int maxDepth, Collection<AssetLocation> 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;
|
||||
|
|
Loading…
Reference in New Issue