2019-12-01 06:56:47 +07:00
|
|
|
apply plugin: "java"
|
|
|
|
|
|
|
|
sourceCompatibility = 1.7
|
|
|
|
|
|
|
|
project.ext.mainClassName = "com.riiablo.server.d2gs.D2GS"
|
2020-11-16 14:49:18 +07:00
|
|
|
project.ext.assetsDir = new File("../../android/assets");
|
2019-12-01 06:56:47 +07:00
|
|
|
|
|
|
|
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) {
|
2020-11-11 15:13:44 +07:00
|
|
|
from files(sourceSets.main.output.classesDirs)
|
2019-12-01 06:56:47 +07:00
|
|
|
from files(sourceSets.main.output.resourcesDir)
|
|
|
|
from {configurations.compile.collect {zipTree(it)}}
|
|
|
|
from files(project.assetsDir);
|
2020-11-16 14:49:18 +07:00
|
|
|
|
2019-12-01 06:56:47 +07:00
|
|
|
manifest {
|
|
|
|
attributes 'Server-Class': project.mainClassName
|
2019-12-01 11:16:58 +07:00
|
|
|
attributes 'Main-Class': project.mainClassName // TODO: not needed in production?
|
2019-12-01 06:56:47 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dist.dependsOn classes
|