-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle.kts
49 lines (45 loc) · 1.81 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
import com.diffplug.gradle.spotless.SpotlessExtension
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.dagger.hilt) apply false
alias(libs.plugins.google.services) apply false
alias(libs.plugins.crashlytics) apply false
alias(libs.plugins.ktlint) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.secret) apply false
alias(libs.plugins.kotlinx.serialization) apply false
alias(libs.plugins.junit5) apply false
alias(libs.plugins.app.distribution) apply false
alias(libs.plugins.spotless) apply false
alias(libs.plugins.org.jetbrains.kotlin.jvm) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.androidTest) apply false
alias(libs.plugins.androidx.baselineprofile) apply false
}
subprojects {
apply(plugin = rootProject.libs.plugins.spotless.get().pluginId)
extensions.configure<SpotlessExtension> {
kotlin {
target("**/*.kt")
targetExclude("${layout.buildDirectory}/**/*.kt")
licenseHeaderFile(rootProject.file("spotless/spotless.license.kt"))
trimTrailingWhitespace()
endWithNewline()
}
format("kts") {
target("**/*.kts")
targetExclude("${layout.buildDirectory}/**/*.kts")
licenseHeaderFile(rootProject.file("spotless/spotless.license.kt"), "(^(?![\\/ ]\\*).*$)")
}
format("xml") {
target("**/*.xml")
targetExclude("**/build/**/*.xml")
licenseHeaderFile(rootProject.file("spotless/spotless.license.xml"), "(<[^!?])")
}
}
}
tasks.register("clean", Delete::class) {
delete(rootProject.layout.buildDirectory)
}