forked from NPM/numass-framework
81 lines
1.8 KiB
Groovy
81 lines
1.8 KiB
Groovy
plugins {
|
|
id "application"
|
|
id 'com.github.johnrengelman.shadow'
|
|
}
|
|
|
|
|
|
if (!hasProperty('mainClass')) {
|
|
ext.mainClass = 'inr.numass.control.ServerApp'//"inr.numass.viewer.test.TestApp"
|
|
}
|
|
|
|
mainClassName = mainClass
|
|
|
|
version = "0.3.0"
|
|
|
|
description = "The control room application for numass slow control"
|
|
|
|
compileKotlin.kotlinOptions.jvmTarget = "1.8"
|
|
|
|
configurations {
|
|
devices.extendsFrom(compile)
|
|
}
|
|
|
|
dependencies {
|
|
//DataForge dependencies
|
|
api project(':numass-control')
|
|
//api project(':numass-server')
|
|
|
|
// optional device classpath
|
|
devices project(':numass-control:cryotemp')
|
|
devices project(':numass-control:msp')
|
|
devices project(':numass-control:vac')
|
|
}
|
|
|
|
shadowJar {
|
|
mergeServiceFiles()
|
|
}
|
|
|
|
|
|
task debugWithDevice(dependsOn: classes, type: JavaExec) {
|
|
main mainClass
|
|
args = ["--config.resource=/config/control.xml"]
|
|
classpath = sourceSets.main.runtimeClasspath + configurations.devices
|
|
description "Start application in debug mode"
|
|
group "debug"
|
|
}
|
|
|
|
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"
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|