diff --git a/build.gradle b/build.gradle index 26b84ea495..0ca74b8a4c 100644 --- a/build.gradle +++ b/build.gradle @@ -163,8 +163,8 @@ project(":core") { testImplementation "org.mockito:mockito-all:1.9.5" testImplementation "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion" - testImplementation "com.badlogicgames.gdx:gdx:$gdxVersion" - testImplementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" + testCompile "com.badlogicgames.gdx:gdx:$gdxVersion" + testCompile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" } }} diff --git a/desktop/build.gradle b/desktop/build.gradle index d4adf1ea0e..97fe21af72 100644 --- a/desktop/build.gradle +++ b/desktop/build.gradle @@ -24,9 +24,10 @@ task debug(dependsOn: classes, type: JavaExec) { } task dist(type: Jar) { - from files(sourceSets.main.output.classesDirs) from files(sourceSets.main.output.resourcesDir) - from {configurations.compile.collect {zipTree(it)}} + from files(sourceSets.main.output.classesDirs) + // see Laurent1967's comment on https://github.com/libgdx/libgdx/issues/5491 + from {configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }} from files(project.assetsDir) manifest { diff --git a/desktop/src/com/unciv/app/desktop/DesktopLauncher.java b/desktop/src/com/unciv/app/desktop/DesktopLauncher.java index b77c0d6feb..a06f054f15 100644 --- a/desktop/src/com/unciv/app/desktop/DesktopLauncher.java +++ b/desktop/src/com/unciv/app/desktop/DesktopLauncher.java @@ -6,20 +6,24 @@ import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.tools.texturepacker.TexturePacker; import com.unciv.UnCivGame; +import java.io.File; + class DesktopLauncher { public static void main (String[] arg) { - TexturePacker.Settings settings = new TexturePacker.Settings(); - settings.maxWidth = 2500; - settings.maxHeight = 2500; - settings.combineSubdirectories=true; - settings.pot=false; - settings.fast=true; + if(new File("../Images").exists()) { // So we don't run this from within a fat JAR + TexturePacker.Settings settings = new TexturePacker.Settings(); + settings.maxWidth = 2500; + settings.maxHeight = 2500; + settings.combineSubdirectories=true; + settings.pot=false; + settings.fast=true; - // This is so they don't look all pixelated - settings.filterMag = Texture.TextureFilter.MipMapLinearLinear; - settings.filterMin = Texture.TextureFilter.MipMapLinearLinear; - TexturePacker.process(settings, "../Images", ".", "game"); + // This is so they don't look all pixelated + settings.filterMag = Texture.TextureFilter.MipMapLinearLinear; + settings.filterMin = Texture.TextureFilter.MipMapLinearLinear; + TexturePacker.process(settings, "../Images", ".", "game"); + } LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); new LwjglApplication(new UnCivGame("Desktop"), config);