diff options
Diffstat (limited to 'server/build.gradle')
-rw-r--r-- | server/build.gradle | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/server/build.gradle b/server/build.gradle new file mode 100644 index 0000000..d2c6481 --- /dev/null +++ b/server/build.gradle @@ -0,0 +1,27 @@ +apply plugin: "java" + +sourceCompatibility = 1.7 +sourceSets.main.java.srcDirs = [ "src/" ] + +project.ext.mainClassName = "ch.asynk.rustanddust.server.Server" + +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) { + from files(sourceSets.main.output.classesDir) + from files(sourceSets.main.output.resourcesDir) + from {configurations.compile.collect {zipTree(it)}} + /* from files(project.assetsDir); */ + + manifest { + attributes 'Main-Class': project.mainClassName + } +} + +dist.dependsOn classes |