-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
49 lines (48 loc) · 1.34 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
plugins {
libs.plugins.run {
alias(androidApplication) apply false
alias(com.android.library) apply false
alias(kotlinAndroid) apply false
alias(hilt.plugin) apply false
alias(ksp) apply false
alias(kotlin.parcelize) apply false
alias(androidx.room) apply false
alias(google.services) apply false
alias(firebase.crashlytics) apply false
alias(compose.compiler) apply false
alias(spotless)
}
}
spotless {
kotlin {
target("**/*.kt")
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
ktlint("0.48.0")
.setEditorConfigPath("$projectDir/.editorconfig") // sample unusual placement
.editorConfigOverride(
mapOf(
"indent_size" to 2,
// intellij_idea is the default style we preset in Spotless, you can override it referring to https://pinterest.github.io/ktlint/latest/rules/code-styles.
"ktlint_code_style" to "intellij_idea",
),
)
}
kotlinGradle {
target("*.gradle.kts") // default target for kotlinGradle
ktlint() // or ktfmt() or prettier()
}
format("misc") {
target("**/*.gradle", "**/*.md", "**/.gitignore")
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
format("xml") {
target("**/*.xml")
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
}