-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
92 lines (81 loc) · 2.63 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
83
84
85
86
87
88
89
90
91
92
import com.diffplug.gradle.spotless.SpotlessExtension
buildscript {
dependencies {
classpath(libs.hilt.android.gradle.plugin)
classpath(libs.google.services)
classpath(libs.firebase.crashlytics.gradlePlugin)
classpath(libs.perf.plugin)
}
}
plugins {
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.kotlinAndroid) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.gms) apply false
alias(libs.plugins.android.test) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.ktlint) apply false
alias(libs.plugins.kotlinx.serialization) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.com.diffplug.spotless) apply false
}
subprojects {
apply {
plugin("com.diffplug.spotless")
plugin("jacoco")
}
configure<SpotlessExtension> {
val lintVersion = "0.49.0"
kotlin {
target("**/*.kt")
ktlint(lintVersion)
.editorConfigOverride(
mapOf(
"ktlint_standard_package-name" to "disabled",
"ij_kotlin_allow_trailing_comma" to "false",
"ij_kotlin_allow_trailing_comma_on_call_site" to "false",
),
)
ktfmt().googleStyle()
licenseHeaderFile("${project.rootProject.projectDir}/license-header.txt")
trimTrailingWhitespace()
indentWithTabs(2)
indentWithSpaces(4)
}
kotlinGradle {
target("*.gradle.kts")
ktlint(lintVersion)
.editorConfigOverride(
mapOf(
"ij_kotlin_allow_trailing_comma" to "false",
"ij_kotlin_allow_trailing_comma_on_call_site" to "false",
)
)
ktfmt().googleStyle()
indentWithTabs(2)
indentWithSpaces(4)
}
format("xml") {
target("**/*.xml")
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
}
configurations.all {
resolutionStrategy {
eachDependency {
when (requested.group) {
"org.jacoco" -> useVersion("0.8.11")
}
}
}
}
tasks.withType<Test> {
configure<JacocoTaskExtension> {
isIncludeNoLocationClasses = true
excludes = listOf("jdk.internal.*", "**org.hl7*")
}
}
}