mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-24 13:39:48 +07:00
29 lines
810 B
Groovy
29 lines
810 B
Groovy
apply plugin: 'java'
|
|
|
|
import org.apache.tools.ant.taskdefs.condition.Os
|
|
|
|
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
|
|
|
sourceSets.main.resources.srcDirs += [ rootProject.file('assets').path ]
|
|
|
|
project.ext.mainClassName = 'com.riiablo.server.d2gs.Main'
|
|
|
|
task run(dependsOn: classes, type: JavaExec) {
|
|
main = project.mainClassName
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
standardInput = System.in
|
|
workingDir = rootProject.file('assets').path
|
|
ignoreExitValue = true
|
|
}
|
|
|
|
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(rootProject.file('assets').path);
|
|
|
|
manifest {
|
|
attributes 'Main-Class': project.mainClassName
|
|
}
|
|
}
|