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

81 lines
1.9 KiB
Groovy
Raw Normal View History

2017-11-14 21:14:15 +03:00
plugins {
2017-05-13 21:46:12 +03:00
id "application"
2017-11-14 21:14:15 +03:00
id 'com.github.johnrengelman.shadow' version '2.0.1'
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-11-13 16:56:34 +03:00
version = "0.3.0"
2017-05-13 21:46:12 +03:00
description = "The control room application for numass slow control"
compileKotlin.kotlinOptions.jvmTarget = "1.8"
2017-11-14 21:14:15 +03:00
configurations {
2017-05-28 11:31:49 +03:00
devices.extendsFrom(compile)
}
2017-05-13 21:46:12 +03:00
2017-05-28 11:31:49 +03:00
dependencies {
//DataForge dependencies
2018-11-17 22:27:12 +03:00
compile project(':numass-control')
//compile project(':numass-server')
2017-05-28 11:31:49 +03:00
// 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-11-14 21:14:15 +03:00
shadowJar {
2017-05-22 16:31:24 +03:00
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
2017-11-14 21:14:15 +03:00
args = ["--config.resource=/config/control.xml"]
classpath = sourceSets.main.runtimeClasspath + configurations.devices
2017-05-26 22:33:56 +03:00
description "Start application in debug mode"
group "debug"
}
2017-11-21 03:17:13 +03:00
task runWithDevice(dependsOn: classes, type: JavaExec) {
main mainClass
args = ["--config.resource=/config/control-real.xml"]
classpath = sourceSets.main.runtimeClasspath + configurations.devices
description "Start application in debug mode"
group "debug"
}
2017-11-14 21:14:15 +03:00
task startScriptWithDevices(type: CreateStartScripts) {
2017-05-28 16:47:11 +03:00
applicationName = "control-room-devices"
mainClassName = mainClass
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.devices
}
2017-11-14 21:14:15 +03:00
distributions {
devices {
2017-05-28 16:47:11 +03:00
contents {
into("lib") {
from jar
from configurations.devices
}
2017-11-14 21:14:15 +03:00
into("bin") {
2017-05-28 16:47:11 +03:00
from startScriptWithDevices
}
}
}
}
2017-05-26 22:33:56 +03:00
2017-10-15 22:49:04 +03:00