-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
55 lines (46 loc) · 1.49 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
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.8.21" apply false
id("io.gitlab.arturbosch.detekt") version "1.22.0"
id("com.github.ben-manes.versions") version "0.46.0"
}
allprojects {
repositories {
mavenCentral()
gradlePluginPortal()
}
tasks.withType<JavaCompile> {
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
apiVersion = "1.5"
freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn")
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.withType<Detekt>().configureEach {
// Target version of the generated JVM bytecode. It is used for type resolution.
jvmTarget = "1.8"
}
}
subprojects {
subprojects {
detekt {
buildUponDefaultConfig = true
allRules = false
config = files("$rootDir/config/detekt.yml")
baseline = file("$projectDir/config/baseline.xml") // a way of suppressing issues before introducing detekt
reports {
html.enabled = true // observe findings in your browser with structure and code snippets
xml.enabled = true // checkstyle like format mainly for integrations like Jenkins
sarif.enabled = true // standardized SARIF format (https://sarifweb.azurewebsites.net/) to support integrations with GitHub Code Scanning
}
}
}
}