-
Notifications
You must be signed in to change notification settings - Fork 24
/
build.gradle.kts
44 lines (37 loc) · 1.46 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
import com.akuleshov7.buildutils.*
import com.saveourtool.diktat.plugin.gradle.DiktatExtension
import com.saveourtool.diktat.plugin.gradle.DiktatGradlePlugin
plugins {
kotlin("multiplatform") apply false
kotlin("plugin.serialization") version Versions.KOTLIN apply false
id("com.akuleshov7.buildutils.publishing-configuration")
id("com.saveourtool.diktat") version "2.0.0"
}
configureVersioning()
allprojects {
repositories {
mavenCentral()
}
apply<DiktatGradlePlugin>()
configure<DiktatExtension> {
diktatConfigFile = rootProject.file("diktat-analysis.yml")
githubActions = findProperty("diktat.githubActions")?.toString()?.toBoolean() ?: false
inputs {
// using `Project#path` here, because it must be unique in gradle's project hierarchy
if (path == rootProject.path) {
include("$rootDir/buildSrc/src/**/*.kt", "$rootDir/*.kts", "$rootDir/buildSrc/**/*.kts")
exclude("src/test/**/*.kt", "src/commonTest/**/*.kt") // path matching this pattern will not be checked by diktat
} else {
include("src/**/*.kt", "**/*.kts")
exclude("src/**test/**/*.kt", "src/commonTest/**/*.kt", "src/jvmTest/**/*.kt") // path matching this pattern will not be checked by diktat
}
}
debug = true
reporters {
plain()
}
}
configureDetekt()
}
createDetektTask()
installGitHooks()