-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
78 lines (65 loc) · 2.2 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
apply plugin: 'java'
apply plugin: 'maven'
def userprofile = System.getenv()['USERPROFILE'] // On Windows...
group = 'oliv.cool.stuff'
version = '1.0'
ant.setproxy(proxyhost: "$proxyHost", proxyport: "$proxyPort") //, proxyuser="user", proxypassword="password")
sourceSets {
main {
java {
srcDir 'src'
}
}
test {
java {
srcDir 'tests'
}
}
}
repositories {
mavenCentral()
maven { url "http://lediouris.net/maven2" }
maven { url "file:///" + userprofile + "/.m2/repository" }
}
dependencies {
testCompile 'junit:junit:4.8.2'
compile 'comm:rxtx:1.0'
compile project(':GeomUtils')
//compile 'oliv.cool.stuff:CoreUtilities:1.0'
compile project(':CoreUtilities')
}
task run(type: JavaExec, dependsOn: build, description: "Run some tests. No GUI, bulk output.") {
main = 'ocss.nmea.parser.StringParsers'
//jvmArgs "-verbose"
classpath project.configurations.default
classpath sourceSets.main.output.classesDir
}
task run2(type: JavaExec, dependsOn: build, description: "Run Custom Client with GUI.") {
main = 'ui.sampleclient.CustomClient'
//jvmArgs "-verbose"
jvmArgs "-Dverbose=true"
jvmArgs "-Djava.library.path=../all-3rd-party/rxtx.distrib/win64"
classpath project.configurations.default
classpath sourceSets.main.output.classesDir
args "COM3" // comma separated if several parameters.
}
task run3(type: JavaExec, dependsOn: build, description: "Run file simulation with GUI.") {
main = 'gui.sampleclient.Main'
jvmArgs "-Dverbose=true"
classpath project.configurations.default
classpath sourceSets.main.output.classesDir
//args "./data/nmea.txt"
args "./data/hydra2.nmea"
}
task copyResources(type: Copy) {
description = 'Copies non-java resources in the output directory before the jar task (png, xml, xsd, ttf, properties, etc)'
from 'src'
into 'build/classes/main'
include '**/*.xml', '**/*.xsd', '**/*.png', '**/*.gif', '**/*.jpg', '**/*.properties', '**/*.ttf', '**/*.html'
}
jar.dependsOn(copyResources)
task tellMeProxy (description: "Spits out the proxy settings.") << {
println "Accessing resources with proxy $proxyHost:$proxyPort"
println "UserProfile: " + System.getenv()['USERPROFILE']
}
compileJava.dependsOn(tellMeProxy)