forked from petercable/driver_control
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
89 lines (72 loc) · 2.78 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'idea'
group = 'com.raytheon.ooi'
version = '1.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
def parser = new File(projectDir.toString() + '/lib/preload/parse_preload.py')
def workDir = new File(projectDir.toString() + "/workDir")
def logDir = new File(projectDir.toString() + "/logs")
def db = new File(workDir.toString() + '/preload.db')
mainClassName = "com.raytheon.ooi.driver_control.Main"
applicationDefaultJvmArgs = ['-DworkDir=' + workDir]
repositories {
mavenCentral()
}
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.7'
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.7'
compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile group: 'org.zeromq', name: 'jeromq', version:'0.3.4'
compile group: 'org.yaml', name: 'snakeyaml', version:'1.13'
compile group: 'org.controlsfx', name: 'controlsfx', version:'8.0.6'
compile group: 'org.xerial', name: 'sqlite-jdbc', version:'3.7.15-M1'
compile group: 'org.commonjava.googlecode.markdown4j', name: 'markdown4j', version:'2.2-cj-1.0'
compile group: 'org.apache.poi', name: 'poi-ooxml', version:'3.10-FINAL'
compile group: 'org.apache.commons', name: 'commons-lang3', version:'3.3.2'
compile group: 'org.apache.commons', name: 'commons-csv', version:'1.0'
compile group: 'org.apache.commons', name: 'commons-io', version:'1.3.2'
compile group: 'org.codehaus.jackson', name: 'jackson-mapper-asl', version:'1.9.13'
}
jar {
// this line below will make a "fat" jar
//from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
manifest { attributes 'Main-Class': 'com.raytheon.ooi.driver_control.Main' }
}
run {
if (project.hasProperty("appArgs"))
args Eval.me(appArgs)
}
task checkEnv << {
if (System.getenv("TEST_BASE") == null)
throw new Exception('Missing required environment variable TEST_BASE')
if (System.getenv("VIRTUAL_ENV") == null)
throw new Exception('Missing required environment variable TEST_BASE')
}
task findMI(type:Exec) {
commandLine 'find', System.getenv("HOME"), '-type', 'd', '-name', 'marine_integrations'
}
task makeWorkDir << {
mkdir(workDir)
}
task cleanWork(type:Delete) {
delete workDir, logDir
}
task clone_preload(type:Exec) {
commandLine 'git', 'submodule', 'update', '--init'
doLast {
println 'Cloning submodule preload_parser'
}
}
task preload(type:Exec, dependsOn:[clone_preload, makeWorkDir]) {
workingDir workDir
commandLine 'python', parser.toString()
doLast {
println 'Generating preload database'
}
}
clone_preload.onlyIf { !parser.exists() }
preload.onlyIf { !db.exists() }
run.dependsOn([preload, checkEnv])
clean.dependsOn(cleanWork)