-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
55 lines (44 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
52
53
54
55
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
plugins {
alias(libs.plugins.kotlin.mpp) apply false
alias(libs.plugins.jetbrains.compose) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.buildconfig) apply false
alias(libs.plugins.detekt)
}
val wasmJsBrowserTestReport by tasks.registering(TestReport::class) {
destinationDirectory.set(layout.buildDirectory.file("reports/wasmJsBrowserTest").get().asFile)
subprojects.forEach {
val wasmJsBrowserTest: KotlinJsTest = it.tasks
.findByName("wasmJsBrowserTest") as? KotlinJsTest
?: return@forEach
testResults.from(wasmJsBrowserTest.binaryResultsDirectory)
}
}
dependencies {
detektPlugins(libs.detekt.formatting)
}
val detektAll by tasks.registering(Detekt::class) {
description = "Runs the Lint check whole project at once."
basePath = rootProject.projectDir.absolutePath
parallel = true
autoCorrect = true
setSource(files(rootProject.projectDir))
config.setFrom(listOf(rootProject.files("config/detekt.yml")))
include("**/*.kt", "**/**.kts")
exclude("**/resources/**", "**/composeResources/**", "**/build/**")
reports {
html {
required.set(true)
outputLocation.set(rootProject.file("lint-reports/kotlin/detekt.html"))
}
sarif {
required.set(true)
outputLocation.set(rootProject.file("lint-reports/kotlin/detekt.sarif"))
}
txt {
required.set(false)
}
}
}