-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathbuild.gradle
88 lines (78 loc) · 2.94 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
76
77
78
79
80
81
82
83
84
85
86
87
88
plugins {
id 'java-library'
id 'jacoco'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
api 'org.springframework.boot:spring-boot-starter-logging:3.2.3'
api 'org.apache.commons:commons-lang3:3.14.0'
api 'org.apache.commons:commons-collections4:4.4'
api 'com.fasterxml.jackson.core:jackson-databind:2.16.1'
api 'org.reflections:reflections:0.10.2'
api "org.projectlombok:lombok:$lombokVersion"
annotationProcessor("org.projectlombok:lombok:$lombokVersion")
testImplementation 'ch.qos.logback:logback-classic:1.4.14'
testImplementation 'com.github.stefanbirkner:system-rules:1.19.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'net.bytebuddy:byte-buddy:1.14.12'
testImplementation 'org.assertj:assertj-core:3.25.3'
testImplementation 'org.hamcrest:hamcrest:2.2'
testImplementation 'org.mockito:mockito-core:5.10.0'
testImplementation 'org.awaitility:awaitility:4.2.0'
testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.16.1'
testAnnotationProcessor("org.projectlombok:lombok:$lombokVersion")
}
group = 'by.andd3dfx'
version = '1.0-SNAPSHOT'
description = 'java-interview-coding'
java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Test) {
testLogging {
events "passed", "skipped", "failed",
// "standardOut", // Uncomment to get all logs during tests execution
"standardError"
}
afterSuite { desc, result ->
if (!desc.parent)
println("${result.resultType} " +
"(${result.testCount} tests, " +
"${result.successfulTestCount} successes, " +
"${result.failedTestCount} failures, " +
"${result.skippedTestCount} skipped)")
}
finalizedBy jacocoTestReport // report is always generated after tests run
jacoco {
destinationFile = layout.buildDirectory.file('jacoco/jacocoTest.exec').get().asFile
classDumpDir = layout.buildDirectory.dir('jacoco/classpathdumps').get().asFile
}
}
jacocoTestReport {
reports {
csv.required = true
xml.required = true
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'**/domain/**',
'**/dto/**',
'**/refactoring*/initial/**',
'**/core/howto/**',
'**/core/predict/**',
])
}))
}
}
task githubWorkflowTest(type: Test) {
exclude '**/**AddMultithreadingTest.class'
exclude '**/**BlockingQueueTest.class'
exclude '**/**DeadlockTest.class'
}