2020-11-17 14:14:33 +07:00
|
|
|
apply plugin: 'java'
|
2020-06-14 07:42:05 +07:00
|
|
|
|
2020-11-17 14:14:33 +07:00
|
|
|
import org.apache.tools.ant.taskdefs.condition.Os
|
2020-06-14 07:42:05 +07:00
|
|
|
|
2020-11-17 14:14:33 +07:00
|
|
|
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
|
|
|
|
2020-11-18 11:09:00 +07:00
|
|
|
sourceSets.main.resources.srcDirs += [ rootProject.file('assets').path ]
|
|
|
|
|
2020-11-17 14:14:33 +07:00
|
|
|
project.ext.mainClassName = 'com.riiablo.server.d2gs.Main'
|
2020-06-14 07:42:05 +07:00
|
|
|
|
|
|
|
task run(dependsOn: classes, type: JavaExec) {
|
2020-11-17 14:14:33 +07:00
|
|
|
main = project.mainClassName
|
|
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
|
|
standardInput = System.in
|
2020-11-18 11:09:00 +07:00
|
|
|
workingDir = rootProject.file('assets').path
|
2020-11-17 14:14:33 +07:00
|
|
|
ignoreExitValue = true
|
2020-06-14 07:42:05 +07:00
|
|
|
}
|
|
|
|
|
2020-11-17 14:14:33 +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)}}
|
2020-11-18 11:09:00 +07:00
|
|
|
from files(rootProject.file('assets').path);
|
2020-11-16 14:49:18 +07:00
|
|
|
|
2020-11-17 14:14:33 +07:00
|
|
|
manifest {
|
|
|
|
attributes 'Main-Class': project.mainClassName
|
|
|
|
}
|
2020-06-14 07:42:05 +07:00
|
|
|
}
|