Gradle changes so the desktop:dist will work. still not 100% since I can't get it to recognize Kotlin yet

This commit is contained in:
Yair Morgenstern 2019-11-11 23:17:12 +02:00
parent b0e29c5d3c
commit 9ad2851b80
3 changed files with 19 additions and 14 deletions

View File

@ -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"
}
}}

View File

@ -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 {

View File

@ -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);