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"/>
|
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</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="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||||
<classpathentry kind="output" path="bin/default"/>
|
<classpathentry kind="output" path="bin/default"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
2
.project
2
.project
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<projectDescription>
|
<projectDescription>
|
||||||
<name>Project-Engine-SimpleJavaEngine</name>
|
<name>GameProject-SimpleJavaEngine</name>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
<projects>
|
<projects>
|
||||||
</projects>
|
</projects>
|
||||||
|
|
38
build.gradle
38
build.gradle
|
@ -11,7 +11,7 @@ eclipse {
|
||||||
downloadSources = true
|
downloadSources = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaLanguageVersion.of(19)
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||||
|
@ -22,7 +22,7 @@ repositories {
|
||||||
|
|
||||||
task srcJar(type: Jar) {
|
task srcJar(type: Jar) {
|
||||||
from sourceSets.main.allSource
|
from sourceSets.main.allSource
|
||||||
classifier = 'sources'
|
archiveClassifier = 'sources'
|
||||||
from {
|
from {
|
||||||
configurations.compile.collect {
|
configurations.compile.collect {
|
||||||
it.isDirectory() ? it : zipTree(it)
|
it.isDirectory() ? it : zipTree(it)
|
||||||
|
@ -44,26 +44,26 @@ jar{
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
//LWJGL 3
|
//LWJGL 3
|
||||||
compile platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
|
implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
|
||||||
|
|
||||||
compile "org.lwjgl:lwjgl"
|
implementation "org.lwjgl:lwjgl"
|
||||||
compile "org.lwjgl:lwjgl-glfw"
|
implementation "org.lwjgl:lwjgl-glfw"
|
||||||
compile "org.lwjgl:lwjgl-jemalloc"
|
implementation "org.lwjgl:lwjgl-jemalloc"
|
||||||
compile "org.lwjgl:lwjgl-openal"
|
implementation "org.lwjgl:lwjgl-openal"
|
||||||
compile "org.lwjgl:lwjgl-opengl"
|
implementation "org.lwjgl:lwjgl-opengl"
|
||||||
compile "org.lwjgl:lwjgl-stb"
|
implementation "org.lwjgl:lwjgl-stb"
|
||||||
compile "org.lwjgl:lwjgl-nfd"
|
implementation "org.lwjgl:lwjgl-nfd"
|
||||||
compile "org.lwjgl:lwjgl::$lwjglNatives"
|
implementation "org.lwjgl:lwjgl::$lwjglNatives"
|
||||||
compile "org.lwjgl:lwjgl-glfw::$lwjglNatives"
|
implementation "org.lwjgl:lwjgl-glfw::$lwjglNatives"
|
||||||
compile "org.lwjgl:lwjgl-jemalloc::$lwjglNatives"
|
implementation "org.lwjgl:lwjgl-jemalloc::$lwjglNatives"
|
||||||
compile "org.lwjgl:lwjgl-openal::$lwjglNatives"
|
implementation "org.lwjgl:lwjgl-openal::$lwjglNatives"
|
||||||
compile "org.lwjgl:lwjgl-opengl::$lwjglNatives"
|
implementation "org.lwjgl:lwjgl-opengl::$lwjglNatives"
|
||||||
compile "org.lwjgl:lwjgl-stb::$lwjglNatives"
|
implementation "org.lwjgl:lwjgl-stb::$lwjglNatives"
|
||||||
compile "org.lwjgl:lwjgl-nfd::$lwjglNatives"
|
implementation "org.lwjgl:lwjgl-nfd::$lwjglNatives"
|
||||||
|
|
||||||
//Gson
|
//Gson
|
||||||
compile 'com.google.code.gson:gson:2.8.6'
|
implementation 'com.google.code.gson:gson:2.8.6'
|
||||||
|
|
||||||
//Primitive Collections
|
//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
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class ZipAssetPackage implements IAssetPackage
|
||||||
protected FileSystem getReference() throws IOException
|
protected FileSystem getReference() throws IOException
|
||||||
{
|
{
|
||||||
usedReferences.getAndIncrement();
|
usedReferences.getAndIncrement();
|
||||||
if(cache == null) cache = FileSystems.newFileSystem(baseFolder, null);
|
if(cache == null) cache = FileSystems.newFileSystem(baseFolder);
|
||||||
return cache;
|
return cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ public class ZipAssetPackage implements IAssetPackage
|
||||||
public List<String> getDomains()
|
public List<String> getDomains()
|
||||||
{
|
{
|
||||||
List<String> domains = new ObjectArrayList<>();
|
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")))
|
try(DirectoryStream<Path> dirs = Files.newDirectoryStream(system.getPath("assets")))
|
||||||
{
|
{
|
||||||
|
@ -98,7 +98,7 @@ public class ZipAssetPackage implements IAssetPackage
|
||||||
@Override
|
@Override
|
||||||
public void getAllAssets(AssetLocation folder, Predicate<String> fileNames, int maxDepth, Collection<AssetLocation> result)
|
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());
|
Path start = system.getPath(folder.getActualLocation());
|
||||||
if(Files.notExists(start)) return;
|
if(Files.notExists(start)) return;
|
||||||
|
|
Loading…
Reference in New Issue