This repository has been archived on 2019-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
ensichat/server/build.gradle

45 lines
1.2 KiB
Groovy

apply plugin: 'scala'
apply plugin: 'application'
dependencies {
compile 'org.scala-lang:scala-library:2.11.7'
compile project(path: ':core')
compile 'com.github.scopt:scopt_2.10:3.3.0'
compile 'ch.qos.logback:logback-classic:1.1.7'
}
mainClassName = 'com.nutomic.ensichat.server.Main'
version = "0.5.2"
applicationName = 'ensichat-server'
jar {
archiveName "${applicationName}.jar"
manifest.attributes 'Main-Class': mainClassName
from(configurations.compile.collect { it.isDirectory() ? it : zipTree(it) })
}
task release(type: Zip) {
archiveName = "$applicationName-${version}.zip"
def baseDir = archiveName - '.zip'
into(baseDir) {
from(project.file('src/dist'))
into ('lib') { from ('build/libs/') }
}
}
release.dependsOn(jar)
run {
// Use this to pass command line arguments via `gradle run`.
//
// Uses comma instead of space for command seperation for simpler parsing.
//
// Examples:
// ```
// ./gradlew server:run -Pargs="--help"
// ./gradlew server:run -Pargs="--name,MyName"
// ./gradlew server:run -Pargs="--name,MyName,--status,My Status"
// ```
if (project.hasProperty('args')) {
args project.args.split('\\s+')
}
}