This repository has been archived by the owner on Apr 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
56 lines (51 loc) · 1.74 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
import com.diffplug.gradle.spotless.SpotlessExtension
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath(libs.kotlin.gradleplugin)
classpath(libs.hilt.plugin)
classpath(libs.agp)
classpath(libs.crashlytics.plugin)
classpath(libs.ktlint)
}
}
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.kotlin.kapt) 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.kotlinx.serialization) apply false
alias(libs.plugins.spotless) apply false
alias(libs.plugins.sentry) apply false
}
subprojects {
apply(plugin = rootProject.libs.plugins.spotless.get().pluginId)
extensions.configure<SpotlessExtension> {
kotlin {
target("**/*.kt")
targetExclude("$buildDir/**/*.kt")
licenseHeaderFile(rootProject.file("spotless/spotless.license.kt"))
trimTrailingWhitespace()
endWithNewline()
}
format("kts") {
target("**/*.kts")
targetExclude("$buildDir/**/*.kts")
licenseHeaderFile(rootProject.file("spotless/spotless.license.kt"), "(^(?![\\/ ]\\*).*$)")
}
format("xml") {
target("**/*.xml")
targetExclude("**/build/**/*.xml")
licenseHeaderFile(rootProject.file("spotless/spotless.license.xml"), "(<[^!?])")
}
}
}