Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
72 lines (61 loc) · 2.01 KB
/
Copy pathbuild.gradle
File metadata and controls
72 lines (61 loc) · 2.01 KB
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
apply plugin: 'groovy'
version = '1.0'
repositories {
mavenCentral()
}
dependencies {
compile 'org.slf4j:slf4j-api:1.7.7'
compile 'org.codehaus.groovy:groovy-all:2.4.3'
compile('org.eclipse.jetty:jetty-server:8.1.8.v20121106')
compile('org.eclipse.jetty:jetty-servlet:8.1.8.v20121106')
compile('javax.servlet:javax.servlet-api:3.0.1')
compile('org.eclipse.jetty.orbit:javax.servlet')
testCompile "org.spockframework:spock-core:1.0-groovy-2.4"
testCompile "junit:junit:4.11"
}
/*
* Gradle tasks for Exercise #1
* */
task Ex1_ServerInstance (dependsOn:'classes',type:JavaExec){
description = "Exercise 1: Executes the server instance"
main = 'exercises.EX1.server.Server'
classpath = sourceSets.main.runtimeClasspath
}
task Ex1_ClientInstance (dependsOn:'classes',type:JavaExec){
description = "Exercise 1: Executes the client instance"
main = 'exercises.EX1.gui.MainGui'
classpath = sourceSets.main.runtimeClasspath
}
/*
* Gradle tasks for Exercise #2
* */
task Ex2_ServerInstance (dependsOn:'classes',type:JavaExec){
description = "Exercise 2: Executes the server instance"
main = 'exercises.EX2.server.Server'
classpath = sourceSets.main.runtimeClasspath
}
task Ex2_ClientInstance (dependsOn:'classes',type:JavaExec){
description = "Exercise 2: Executes the client instance"
main = 'exercises.EX2.gui.CalculatorFrame'
classpath = sourceSets.main.runtimeClasspath
}
/*
* Gradle tasks for Exercise #3
* */
task Ex3_LamportSimulation (dependsOn:'classes',type:JavaExec){
description = "Exercise 3: Lamport's simulation"
main = 'exercises.EX3.DCSystem'
classpath = sourceSets.main.runtimeClasspath
if(project.hasProperty('args')){
println "Has args!!! ${project.args}"
args project.args.split(',')
}
}
/*
* Gradle tasks for Restful Calc
* */
task RestCalc(dependsOn:'classes',type:JavaExec){
description = "Restful server Calculator "
main = 'exercises.RestCalc.Main'
classpath = sourceSets.main.runtimeClasspath
}