-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
88 lines (75 loc) · 1.99 KB
/
build.gradle.kts
File metadata and controls
88 lines (75 loc) · 1.99 KB
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 {
java
application
id("com.github.ben-manes.versions") version "0.52.0"
checkstyle
jacoco
id("org.sonarqube") version "6.3.1.5724"
}
group = "hexlet.code"
version = "1.0-SNAPSHOT"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
sonarqube {
properties {
property("sonar.projectKey", "MouserRU_java-project-71")
property("sonar.organization", "mouserru-1")
}
}
checkstyle {
toolVersion = "11.0.0"
configFile = file("config/checkstyle/checkstyle.xml")
}
dependencies {
// Main implementation dependencies
implementation("info.picocli:picocli:4.7.7")
implementation("com.fasterxml.jackson.core:jackson-databind:2.18.3")
// Annotation processors
annotationProcessor("info.picocli:picocli-codegen:4.7.7")
// Test dependencies
testImplementation(platform("org.junit:junit-bom:5.13.4"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.test {
useJUnitPlatform()
testLogging {
events("started", "passed", "skipped", "failed")
}
finalizedBy(tasks.jacocoTestReport)
}
application {
mainClass = "hexlet.code.App"
}
jacoco {
toolVersion = "0.8.13"
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
reports {
xml.required = true
html.required = true
csv.required = false
xml.outputLocation = layout.buildDirectory.file("reports/jacoco/test.xml")
html.outputLocation = layout.buildDirectory.dir("reports/jacoco/html")
}
}
tasks.jacocoTestCoverageVerification {
dependsOn(tasks.jacocoTestReport)
violationRules {
rule {
limit {
counter = "LINE"
minimum = "0.5".toBigDecimal()
}
}
}
classDirectories.setFrom(tasks.jacocoTestReport.get().classDirectories)
}