initial push
This commit is contained in:
parent
1ba01e529a
commit
58317495a6
12 changed files with 516 additions and 0 deletions
49
desktop/build.gradle
Normal file
49
desktop/build.gradle
Normal file
|
@ -0,0 +1,49 @@
|
|||
sourceCompatibility = 1.8
|
||||
sourceSets.main.java.srcDirs = [ "src/" ]
|
||||
sourceSets.main.resources.srcDirs = ["../assets"]
|
||||
|
||||
project.ext.mainClassName = "com.monjaro.gamejam.DesktopLauncher"
|
||||
project.ext.assetsDir = new File("../assets")
|
||||
|
||||
import org.gradle.internal.os.OperatingSystem
|
||||
|
||||
tasks.register('run', JavaExec) {
|
||||
dependsOn classes
|
||||
mainClass = project.mainClassName
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
standardInput = System.in
|
||||
workingDir = project.assetsDir
|
||||
ignoreExitValue = true
|
||||
|
||||
if (OperatingSystem.current() == OperatingSystem.MAC_OS) {
|
||||
// Required to run on macOS
|
||||
jvmArgs += "-XstartOnFirstThread"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('debug', JavaExec) {
|
||||
dependsOn classes
|
||||
mainClass = project.mainClassName
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
standardInput = System.in
|
||||
workingDir = project.assetsDir
|
||||
ignoreExitValue = true
|
||||
debug = true
|
||||
}
|
||||
|
||||
tasks.register('dist', Jar) {
|
||||
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
|
||||
manifest {
|
||||
attributes 'Main-Class': project.mainClassName
|
||||
}
|
||||
dependsOn configurations.runtimeClasspath
|
||||
from {
|
||||
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
||||
}
|
||||
with jar
|
||||
}
|
||||
|
||||
|
||||
dist.dependsOn classes
|
||||
|
||||
eclipse.project.name = appName + "-desktop"
|
15
desktop/src/com/monjaro/gamejam/DesktopLauncher.java
Normal file
15
desktop/src/com/monjaro/gamejam/DesktopLauncher.java
Normal file
|
@ -0,0 +1,15 @@
|
|||
package com.monjaro.gamejam;
|
||||
|
||||
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
|
||||
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
|
||||
import com.monjaro.gamejam.Game;
|
||||
|
||||
// Please note that on macOS your application needs to be started with the -XstartOnFirstThread JVM argument
|
||||
public class DesktopLauncher {
|
||||
public static void main (String[] arg) {
|
||||
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
|
||||
config.setForegroundFPS(60);
|
||||
config.setTitle("GameJam");
|
||||
new Lwjgl3Application(new Game(), config);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue