-
Notifications
You must be signed in to change notification settings - Fork 128
/
Copy pathbuild.gradle.kts
51 lines (42 loc) · 1.59 KB
/
build.gradle.kts
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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
application
jacoco
id("checkstyle")
id("io.freefair.lombok") version "8.6"
id("com.github.ben-manes.versions") version "0.50.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
// Плагин для публикации отчета о покрытии тестами на SonarQube
id("org.sonarqube") version "6.0.1.5171"
}
group = "io.hexlet"
version = "1.0-SNAPSHOT"
application { mainClass.set("io.hexlet.Application") }
repositories { mavenCentral() }
dependencies {
implementation("org.apache.commons:commons-lang3:3.14.0")
implementation("org.apache.commons:commons-collections4:4.4")
testImplementation(platform("org.junit:junit-bom:5.10.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
tasks.test {
useJUnitPlatform()
// https://technology.lastminute.com/junit5-kotlin-and-gradle-dsl/
testLogging {
exceptionFormat = TestExceptionFormat.FULL
events = mutableSetOf(TestLogEvent.FAILED, TestLogEvent.PASSED, TestLogEvent.SKIPPED)
// showStackTraces = true
// showCauses = true
showStandardStreams = true
}
}
tasks.jacocoTestReport { reports { xml.required.set(true) } }
// Конфигурация плагина org.sonarqube
sonar {
properties {
property("sonar.projectKey", "hexlet-boilerplates_java-package")
property("sonar.organization", "hexlet-boilerplates")
property("sonar.host.url", "https://sonarcloud.io")
}
}