-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
41 lines (35 loc) · 1.05 KB
/
build.gradle
File metadata and controls
41 lines (35 loc) · 1.05 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
apply plugin: 'java'
version = '1.0'
ext {
tp_number = '00'
}
repositories {
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.12'
}
clean.doLast {
// delete also files generated by mark task
file("${rootDir}/TP${tp_number}.test").delete()
file("${rootDir}/TP${tp_number}.html").delete()
}
task mark(type: JavaExec){
group = 'verification'
description = 'Runs other unit tests and Generates TP result.'
dependsOn 'compileJava'
main = "Tests"
systemProperty "fichierScenario", "TP${tp_number}.test"
classpath files([ "${buildDir}/classes/java/main", "install/test${tp_number}.jar" ])
classpath sourceSets.test.runtimeClasspath // to find JUnit jar
}
task myTest(type: JavaExec){
dependsOn compileJava
dependsOn compileTestJava
group = 'verification'
description = 'Runs the unit tests in text mode.'
main = "AllTests"
classpath files([ "${buildDir}/classes/java/test" ]) // yaps test classes
classpath sourceSets.test.runtimeClasspath // to find JUnit jar
classpath sourceSets.main.runtimeClasspath
}