added distribution task to client buildscript

This commit is contained in:
2021-11-17 12:31:35 +01:00
parent f7b1f94a4f
commit 6bbdfbc4a6
15 changed files with 36 additions and 28 deletions

View File

@@ -14,7 +14,7 @@ project(":wizard-client:wizard-client-libgdx:desktop") {
dependencies {
implementation project(":wizard-client:wizard-client-libgdx:core")
api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
api "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
api "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
}

View File

@@ -1,10 +1,10 @@
{
"com.badlogic.gdx.graphics.g2d.BitmapFont": {
"default-font": {
"file": "../font/coolvetica.fnt"
"file": "font/coolvetica.fnt"
},
"enchanted": {
"file": "../font/enchanted.fnt"
"file": "font/enchanted.fnt"
}
},
"com.badlogic.gdx.graphics.Color": {

View File

@@ -1,14 +1,17 @@
//file:noinspection GroovyAssignabilityCheck
//file:noinspection GroovyAccessibility
ext {
javaMainClass = "eu.jonahbauer.wizard.client.libgdx.desktop.DesktopLauncher"
assetsDir = new File("../core/src/main/resources")
plugins {
id 'application'
}
task run(type: JavaExec, dependsOn: classes) {
mainClass = javaMainClass
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
ignoreExitValue true
application {
mainClass = "eu.jonahbauer.wizard.client.libgdx.desktop.DesktopLauncher"
run {
ignoreExitValue true
}
}
distributions {
main {
distributionBaseName = 'wizard-client'
}
}

View File

@@ -1,14 +1,14 @@
package eu.jonahbauer.wizard.client.libgdx.desktop;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
import eu.jonahbauer.wizard.client.libgdx.WizardGame;
public class DesktopLauncher {
public static void main (String[] arg) {
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.title = "Wizard Jubilaeumsedition 2021";
config.foregroundFPS = 60;
new LwjglApplication(new WizardGame(), config);
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
config.setTitle("Wizard Jubilaeumsedition 2021");
config.setForegroundFPS(60);
new Lwjgl3Application(new WizardGame(), config);
}
}