apply plugin: "java" sourceCompatibility = 1.8 sourceSets.main.java.srcDirs = [ "src/" ] project.ext.mainClassName = "se.cookery.desktop.DesktopLauncher" dependencies { implementation project(":core") runtime "org.jmonkeyengine:jme3-lwjgl3:${jme3Version}-stable" runtime "org.jmonkeyengine:jme3-desktop:${jme3Version}-stable" } task run(dependsOn: classes, type: JavaExec) { main = project.mainClassName classpath = sourceSets.main.runtimeClasspath standardInput = System.in ignoreExitValue = true } task debug(dependsOn: classes, type: JavaExec) { main = project.mainClassName classpath = sourceSets.main.runtimeClasspath standardInput = System.in ignoreExitValue = true debug = true } task dist(type: Jar) { manifest { attributes 'Main-Class': project.mainClassName } from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } } with jar } dist.dependsOn classes