-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
72 lines (56 loc) · 1.54 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
plugins {
id 'java'
id 'application'
}
defaultTasks 'clean', 'build', 'cucumber'
repositories {
mavenCentral()
}
jar.manifest {
attributes('Main-Class': 'de.itagile.golf.Main')
}
sourceSets {
test {
java {
srcDirs = ['src/unittests/java','src/cucumber/java']
}
resources {
srcDirs = ['src/cucumber/resources']
}
}
}
test {
useJUnitPlatform()
exclude '**/AllFeatures.class'
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.1'
testImplementation 'org.hamcrest:hamcrest-library:2.2'
// Eclipse Workaround. Eclipse needs an old junit Version.
testRuntimeOnly 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.+'
testImplementation 'io.cucumber:cucumber-java:7.11.+'
testImplementation 'io.cucumber:cucumber-picocontainer:7.11.+'
}
configurations {
cucumberRuntime {
extendsFrom testImplementation
}
}
task cucumber() {
dependsOn assemble, test
doLast {
javaexec {
main = "io.cucumber.core.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = [
'--plugin', 'pretty',
'--plugin', 'html:build/reports/tests/cucumber-report.html',
'--glue', 'de.itagile.golf',
'--tags', 'not @ignore',
'src/cucumber/resources'
]
}
}
}
mainClassName = 'de.itagile.golf.Main'