-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbuild.gradle
75 lines (59 loc) · 1.59 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
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'jacoco'
// Old plugin mechanism
apply plugin: 'org.junit.platform.gradle.plugin' // Depends on external dependencies for build script
configurations {
cucumberRuntime {
extendsFrom testRuntime
}
}
task cucumber() {
dependsOn assemble, compileTestJava
doLast {
javaexec {
main = "cucumber.api.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'pretty', '--glue', 'gradle.cucumber', 'src/test/resources']
}
}
}
dependencies {
testCompile 'org.assertj:assertj-core:3.9.0'
testCompile 'io.cucumber:cucumber-java:2.4.0'
testCompile 'io.cucumber:cucumber-junit:2.4.0'
testCompile group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '4.12.2'
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.0.2'
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.0.2'
}
test {
finalizedBy jacocoTestReport
}
// Code coverage
jacoco {
toolVersion = '0.7.9'
applyTo junitPlatformTest
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
}
check.dependsOn jacocoTestReport
junitPlatformTest {
jacoco {
destinationFile = file("$buildDir/jacoco/test.exec")
}
}
repositories {
mavenCentral()
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.2'
}
}