-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
46 lines (41 loc) · 1.34 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.3.0"
}
}
allprojects {
group 'com.trendmicro.course.unittesting'
version '0.0.1'
}
subprojects { subproject ->
apply plugin: 'java'
apply plugin: 'info.solidsoft.pitest'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html
tasks.withType(Test) {
testLogging.showStandardStreams = true
beforeTest { descriptor ->
logger.lifecycle("Test: [" + descriptor.className + "] . " + descriptor.name + "() " + "[Start]")
}
// https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/TestResult.html
afterTest { descriptor, result ->
logger.lifecycle("Test: [" + descriptor.className + "] . " + descriptor.name + "() " + "[Done]"
+ ", result = " + result.resultType)
if (result.exception) {
result.exception.printStackTrace()
}
}
}
}
}