-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
57 lines (46 loc) · 1.77 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
52
53
54
55
56
57
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.7.10"
kotlin("plugin.spring") version "1.7.10"
idea
id("io.gitlab.arturbosch.detekt") version "1.21.0"
id("com.github.ben-manes.versions") version "0.42.0"
}
group = "example.detekt"
repositories {
mavenCentral()
}
dependencies {
// Rules out ktlint plugin
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.20.0")
implementation("org.springframework.boot:spring-boot-starter-web:${property("springWebVersion")}")
testImplementation("org.assertj:assertj-core:${property("assertJVersion")}")
testImplementation("org.springframework.boot:spring-boot-starter-test:${property("springWebVersion")}")
testImplementation("org.testcontainers:junit-jupiter:${property("testcontainersVersion")}")
}
idea {
module {
inheritOutputDirs = false
}
}
detekt {
toolVersion = "1.21.0"
config = files("config/detekt/detekt.yml")
buildUponDefaultConfig = true
}
tasks {
withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = JavaVersion.VERSION_17.toString()
}
}
withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
reports {
html.required.set(true) // observe findings in your browser with structure and code snippets
xml.required.set(false) // checkstyle like format mainly for integrations like Jenkins
txt.required.set(false) // similar to the console output, contains issue signature to manually edit baseline files
sarif.required.set(false) // standardized SARIF format (https://sarifweb.azurewebsites.net/) to support integrations with Github Code Scanning
}
}
}