forked from asinbow/junit5-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
45 lines (35 loc) · 1.01 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
plugins {
id 'java'
id 'eclipse' // optional (to generate Eclipse project files)
id 'idea' // optional (to generate IntelliJ IDEA project files)
id 'jacoco'
}
repositories {
mavenCentral()
}
dependencies {
def junit4Version = '4.13'
def junitBomVersion = '5.6.2'
testImplementation(platform("org.junit:junit-bom:$junitBomVersion"))
// JUnit Jupiter API and TestEngine implementation
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("junit:junit:${junit4Version}")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine") {
because 'allows JUnit 3 and JUnit 4 tests to run'
}
testRuntimeOnly("org.junit.platform:junit-platform-launcher") {
because 'allows tests to run from IDEs that bundle older version of launcher'
}
}
test {
useJUnitPlatform {
// includeEngines 'junit-jupiter', 'junit-vintage'
// excludeEngines 'custom-engine'
// includeTags 'fast'
excludeTags 'slow'
}
testLogging {
events 'passed', 'skipped', 'failed'
}
finalizedBy(jacocoTestReport)
}