generated from JetBrains/compose-multiplatform-template
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle.kts
82 lines (69 loc) · 1.98 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
plugins {
// this is necessary to avoid the plugins to be loaded multiple times
// in each subproject's classloader
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.android.app) apply false
alias(libs.plugins.android.library) apply false
alias(
libs
.plugins
.jetbrains
.compose
.mutiplatform,
) apply false
alias(libs.plugins.buildkonfig) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.spotless) apply false
}
allprojects {
configurations.all {
resolutionStrategy.eachDependency {
if (requested.group == "io.github.hoc081098") {
// Check for updates every build
resolutionStrategy.cacheChangingModulesFor(30, TimeUnit.MINUTES)
}
}
}
apply<com.diffplug.gradle.spotless.SpotlessPlugin>()
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
val ktlintVersion =
rootProject
.libs
.versions
.ktlint
.get()
kotlin {
target("**/*.kt")
targetExclude("**/build/**/*.kt", "**/.gradle/**/*.kt")
ktlint(ktlintVersion)
.setEditorConfigPath(rootProject.file(".editorconfig"))
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
format("xml") {
target("**/res/**/*.xml")
targetExclude("**/build/**/*.xml", "**/.idea/**/*.xml", "**/.gradle/**/*.xml")
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
lineEndings =
com
.diffplug
.spotless
.LineEnding
.UNIX
}
kotlinGradle {
target("**/*.gradle.kts", "*.gradle.kts")
targetExclude("**/build/**/*.kts", "**/.gradle/**/*.kts")
ktlint(ktlintVersion)
.setEditorConfigPath(rootProject.file(".editorconfig"))
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
}
}