-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
executable file
·30 lines (28 loc) · 1.02 KB
/
build.gradle.kts
File metadata and controls
executable file
·30 lines (28 loc) · 1.02 KB
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
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.spotless) apply false
}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
subprojects {
apply(plugin = "com.diffplug.spotless")
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
kotlin {
target("**/*.kt")
targetExclude("${layout.buildDirectory}/**/*.kt")
ktlint()
licenseHeaderFile(rootProject.file("spotless/copyright.kt"))
}
kotlinGradle {
target("*.gradle.kts")
targetExclude("${layout.buildDirectory}/**/*.kt")
ktlint()
// Look for the first line that doesn't have a block comment (assumed to be the license)
licenseHeaderFile(rootProject.file("spotless/copyright.kt"), "(^(?![\\/ ]\\*).*$)")
}
}
}