Bug 18: Removed LibGDX dependency and code from the Pixel Game Library

This commit is contained in:
Robert Vokac 2024-09-20 17:59:23 +02:00 committed by Robert Vokac
parent 213820b56e
commit f2525489bb
Signed by: robertvokac
GPG Key ID: FB9CE8E20AADA55F
4 changed files with 1 additions and 19 deletions

View File

@ -21,7 +21,6 @@ repositories {
}
dependencies {
api "com.badlogicgames.gdx:gdx:$gdxVersion"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
compileOnly "org.projectlombok:lombok:$lombokVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.3"

View File

@ -1,4 +1,2 @@
lombokVersion=1.18.34
gdxVersion=1.12.1

View File

@ -1,4 +1,4 @@
// A list of which subprojects to load as part of the same larger project.
// You can remove Strings from the list and reload the Gradle project
// if you want to temporarily disable a subproject.
//include 'lwjgl3', 'android', 'html', 'core', 'pixel-backend-libgdx'
//include 'lwjgl3', 'android', 'html', 'core'

View File

@ -19,9 +19,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.pixelgamelibrary.api.utils;
import com.badlogic.gdx.Application;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.pixelgamelibrary.api.Pixel;
import com.pixelgamelibrary.api.storage.StorageException;
import java.util.ArrayList;
@ -29,7 +26,6 @@ import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
@ -156,17 +152,6 @@ public class AssetsTxt {
}
public List<FileHandle> list(FileHandle fileHandle) {
String pathToDirectory = fileHandle.path();//((fileHandle.path().isEmpty() ? "" : (fileHandle.path() + "/"))) + fileHandle.name();
Function<String, FileHandle> createFileHandle = s
-> Gdx.app.getType() == Application.ApplicationType.Desktop
? Gdx.files.classpath(s) : Gdx.files.internal(s);
return AssetsTxt.this.list(pathToDirectory)
.stream()
.map(p -> createFileHandle.apply((pathToDirectory.equals(".") ? "" : (pathToDirectory + "/")) + p))
.collect(Collectors.toList());
}
static String convertListStringToStringPath(List<String> list) {
return list.stream().collect(Collectors.joining("/"));
}