-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
34 lines (29 loc) · 880 Bytes
/
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
buildscript {
}
plugins {
id("com.android.application") version "8.1.1" apply false
id("com.android.library") version "8.1.1" apply false
//https://kotlinlang.org/docs/releases.html#update-to-a-new-release
id("org.jetbrains.kotlin.android") version "1.8.21" apply false
id("com.diffplug.spotless") version "6.19.0" apply false
}
subprojects {
apply(plugin = "com.diffplug.spotless")
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
kotlin {
target("**/*.kt")
targetExclude("$buildDir/**/*.kt")
ktlint()
licenseHeaderFile(rootProject.file("spotless/copyright.kt"))
}
kotlinGradle {
target("*.gradle.kts")
ktlint()
}
}
afterEvaluate {
tasks.named("preBuild") {
dependsOn("spotlessApply")
}
}
}