riiablo/mpqviewer/build.gradle

41 lines
1.1 KiB
Groovy
Raw Normal View History

apply plugin: 'java'
2019-01-12 16:04:56 +07:00
import org.apache.tools.ant.taskdefs.condition.Os
2019-01-12 16:04:56 +07:00
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
2019-01-12 16:04:56 +07:00
project.ext.mainClassName = 'com.riiablo.mpq.MPQViewer'
project.ext.assetsDir = new File('assets');
project.ext.visuiVersion = '1.4.2'
dependencies {
implementation project(':core')
implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
implementation "commons-cli:commons-cli:$cliVersion"
implementation "com.kotcrab.vis:vis-ui:$visuiVersion"
2019-01-12 16:04:56 +07:00
}
task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
ignoreExitValue = true
if(Os.isFamily(Os.FAMILY_MAC))
jvmArgs += "-XstartOnFirstThread"
2019-01-12 16:04:56 +07:00
}
task dist(dependsOn: classes, type: Jar) {
from files(sourceSets.main.output.classesDirs)
from files(sourceSets.main.output.resourcesDir)
from {configurations.compile.collect {zipTree(it)}}
from files(project.assetsDir);
manifest {
attributes 'Main-Class': project.mainClassName
}
}