-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
45 lines (43 loc) · 1.63 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
import io.gitlab.arturbosch.detekt.extensions.DetektExtension
plugins {
// this is necessary to avoid the plugins to be loaded multiple times
// in each subproject's classloader
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.jetbrainsCompose) apply false
alias(libs.plugins.kotlinMultiplatform) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.detekt) apply false
alias(libs.plugins.spotless)
alias(libs.plugins.kotlin.dokka)
alias(libs.plugins.skie) apply false
}
subprojects {
apply(plugin = rootProject.libs.plugins.kotlin.dokka.get().pluginId)
apply(plugin = rootProject.libs.plugins.detekt.get().pluginId)
apply(plugin = rootProject.libs.plugins.spotless.get().pluginId)
configure<DetektExtension> {
buildUponDefaultConfig = true
allRules = false
config.setFrom("$rootDir/detekt.yml")
}
}
spotless {
kotlin {
target("**/*.kt")
ktlint()
.editorConfigOverride(
mapOf(
"indent_size" to 4,
"indent_style" to "space",
"ij_kotlin_imports_layout" to "*,java.**,javax.**,kotlin.**,kotlinx.**,^",
"ij_kotlin_allow_trailing_comma_on_call_site" to "true",
"ij_kotlin_allow_trailing_comma" to "true",
"ktlint_function_naming_ignore_when_annotated_with" to "Composable",
"ktlint_code_style" to "android_studio",
)
)
trimTrailingWhitespace()
endWithNewline()
}
}