riiablo/server/d2gs/build.gradle

29 lines
803 B
Groovy
Raw Normal View History

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