numass-framework/numass-control/control-room/build.gradle

72 lines
1.6 KiB
Groovy
Raw Normal View History

2017-05-13 21:46:12 +03:00
plugins{
id "application"
2017-05-22 16:31:24 +03:00
id 'com.github.johnrengelman.shadow' version '2.0.0'
2017-05-13 21:46:12 +03:00
}
2017-05-31 09:53:21 +03:00
2017-05-13 21:46:12 +03:00
if (!hasProperty('mainClass')) {
2017-05-19 15:02:31 +03:00
ext.mainClass = 'inr.numass.control.ServerApp'//"inr.numass.viewer.test.TestApp"
2017-05-13 21:46:12 +03:00
}
mainClassName = mainClass
2017-05-26 22:33:56 +03:00
version = "0.2.0"
2017-05-13 21:46:12 +03:00
description = "The control room application for numass slow control"
compileKotlin.kotlinOptions.jvmTarget = "1.8"
2017-05-28 11:31:49 +03:00
configurations{
devices.extendsFrom(compile)
}
2017-05-13 21:46:12 +03:00
2017-05-28 11:31:49 +03:00
dependencies {
//DataForge dependencies
compile project(':numass-control')
compile project(':numass-server')
// optional device classpath
devices project(':numass-control:cryotemp')
devices project(':numass-control:msp')
devices project(':numass-control:vac')
2017-05-13 21:46:12 +03:00
}
2017-05-22 16:31:24 +03:00
shadowJar{
mergeServiceFiles()
}
2017-05-13 21:46:12 +03:00
2017-05-28 11:31:49 +03:00
task debugWithDevice(dependsOn: classes, type: JavaExec) {
2017-05-26 22:33:56 +03:00
main mainClass
args "--config.resource=/config/server.xml"
2017-05-28 11:31:49 +03:00
classpath = sourceSets.main.runtimeClasspath + configurations.devices
2017-05-26 22:33:56 +03:00
description "Start application in debug mode"
group "debug"
}
2017-05-28 16:47:11 +03:00
task startScriptWithDevices(type: CreateStartScripts){
applicationName = "control-room-devices"
mainClassName = mainClass
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.devices
}
distributions{
devices{
contents {
into("lib") {
from jar
from configurations.devices
}
into("bin"){
from startScriptWithDevices
}
}
}
}
2017-05-26 22:33:56 +03:00