2020-11-17 14:14:33 +07:00
|
|
|
apply plugin: 'java'
|
2019-01-14 16:54:17 +07:00
|
|
|
|
2020-11-17 14:14:33 +07:00
|
|
|
import org.apache.tools.ant.taskdefs.condition.Os
|
2019-01-14 16:54:17 +07:00
|
|
|
|
2020-11-17 14:14:33 +07:00
|
|
|
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
|
|
|
|
|
|
|
project.ext.mainClassName = 'com.riiablo.server.bnls.BNLS'
|
2019-01-14 16:54:17 +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
|
|
|
|
ignoreExitValue = true
|
|
|
|
|
|
|
|
if(Os.isFamily(Os.FAMILY_MAC))
|
|
|
|
jvmArgs += "-XstartOnFirstThread"
|
2019-01-14 16:54:17 +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-16 14:49:18 +07:00
|
|
|
|
2020-11-17 14:14:33 +07:00
|
|
|
manifest {
|
|
|
|
attributes 'Main-Class': project.mainClassName
|
|
|
|
}
|
2019-01-14 16:54:17 +07:00
|
|
|
}
|