2017-05-31 09:53:21 +03:00
|
|
|
buildscript {
|
2017-10-15 22:49:04 +03:00
|
|
|
ext.kotlin_version = '1.1.51'
|
2017-08-27 22:07:32 +03:00
|
|
|
ext.kotlin_version = '1.1.4-2'
|
2017-05-31 09:53:21 +03:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects{
|
|
|
|
apply plugin: "kotlin"
|
|
|
|
|
|
|
|
compileKotlin {
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
|
|
|
javaParameters = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-10-22 09:40:25 +03:00
|
|
|
dependencies {
|
2017-04-15 22:15:53 +03:00
|
|
|
compile project(':numass-client')
|
2017-04-05 22:07:43 +03:00
|
|
|
compile "hep.dataforge:plots-jfc" // project(':dataforge-plots:plots-jfc')
|
|
|
|
compile "hep.dataforge:dataforge-control" //project(':dataforge-control')
|
2017-08-27 22:07:32 +03:00
|
|
|
compile "hep.dataforge:kodex-fx"
|
2017-10-15 22:49:04 +03:00
|
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
|
2017-04-29 20:40:40 +03:00
|
|
|
|
2017-05-17 20:21:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
task installAll(type: Copy) {
|
|
|
|
group "numass"
|
|
|
|
|
|
|
|
description "Install all control projects into the same directory"
|
|
|
|
|
|
|
|
def parser = new XmlParser()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subprojects { sub ->
|
|
|
|
dependsOn sub.getTasksByName("installDist", false).first()
|
|
|
|
String distDir = "${sub.buildDir}/install/${sub.name}"
|
|
|
|
from distDir
|
|
|
|
}
|
|
|
|
into "$buildDir/install/numass-control"
|
|
|
|
|
|
|
|
doLast {
|
|
|
|
def configRoot = new Node(null, "config");
|
|
|
|
subprojects { sub ->
|
|
|
|
//add device configuration file
|
2017-05-19 15:02:31 +03:00
|
|
|
sub.fileTree(dir: 'src/main/resources/config', includes: ['**/*.xml']).each { cfgFile ->
|
|
|
|
println "Found config file ${cfgFile}"
|
2017-05-17 20:21:12 +03:00
|
|
|
parser.parse(cfgFile).children().each {
|
|
|
|
configRoot.append(it as Node)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!configRoot.children().isEmpty()) {
|
2017-05-18 12:53:21 +03:00
|
|
|
File outFile = file("$buildDir/install/numass-control/bin/numass-control.xml")
|
2017-05-17 20:21:12 +03:00
|
|
|
outFile.getParentFile().mkdirs();
|
|
|
|
outFile.createNewFile();
|
|
|
|
new XmlNodePrinter(outFile.newPrintWriter()).print(configRoot)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task distAll(dependsOn: installAll, type: Zip) {
|
|
|
|
group "numass"
|
|
|
|
|
|
|
|
description "Make a distribution of all control projects"
|
|
|
|
|
|
|
|
from "$buildDir/install/numass-control"
|
2017-10-15 22:49:04 +03:00
|
|
|
}
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
compileKotlin {
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
compileTestKotlin {
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
|
|
|
}
|
2016-10-22 09:40:25 +03:00
|
|
|
}
|