riiablo/mpqviewer/build.gradle
Collin Smith 269f283c9b Changed to standard gradle src directory structure
Changed to standard gradle src directory structure
Changed some working directories to work properly with gradle tasks
Changed MPQViewer asset path to empty string
2020-11-15 23:49:18 -08:00

28 lines
694 B
Groovy

apply plugin: "java"
sourceCompatibility = 1.7
project.ext.mainClassName = "com.riiablo.mpq.MPQViewer"
project.ext.assetsDir = new File("assets");
task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
ignoreExitValue = true
}
task dist(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
}
}
dist.dependsOn classes