-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
94 lines (89 loc) · 2.31 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
94 lines (89 loc) · 2.31 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
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
93
94
buildscript {
repositories {
google()
mavenCentral()
}
configurations.classpath {
resolutionStrategy.activateDependencyLocking()
}
dependencies {
classpath(libs.kotlin.gradle) // pins KGP 2.3.0 (higher than AGP 9's bundled 2.2.10)
}
}
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.maven.central.publish) apply false
alias(libs.plugins.spotless)
}
allprojects {
dependencyLocking {
lockAllConfigurations()
}
}
tasks.register("resolveAndLockAll") {
group = "verification"
description = "Resolves build, test, lint, and formatting dependencies used to generate lockfiles."
dependsOn(
"spotlessCheck",
"app:lint",
"provider:lint",
"app:assembleDebug",
"provider:assembleDebug",
"app:assembleDebugAndroidTest",
"app:assembleRelease",
"app:bundleRelease",
"provider:assembleRelease",
"provider:publishToMavenLocal",
"provider:test",
)
}
spotless {
java {
target("**/*.java")
googleJavaFormat().aosp().reflowLongStrings(true)
removeUnusedImports()
trimTrailingWhitespace()
leadingTabsToSpaces()
endWithNewline()
}
kotlin {
target("**/*.kt")
ktfmt().googleStyle().configure {
it.setBlockIndent(4)
it.setContinuationIndent(4)
}
ktlint()
trimTrailingWhitespace()
leadingTabsToSpaces()
endWithNewline()
}
kotlinGradle {
target("**/*.gradle.kts")
ktlint().editorConfigOverride(
mapOf("ktlint_standard_property-naming" to "disabled"),
)
trimTrailingWhitespace()
leadingTabsToSpaces()
endWithNewline()
}
format("misc") {
target("**/*.md", "**/.gitignore")
leadingTabsToSpaces()
trimTrailingWhitespace()
endWithNewline()
}
format("xml") {
target("**/*.xml")
targetExclude(".idea/**/*.xml")
leadingTabsToSpaces()
trimTrailingWhitespace()
endWithNewline()
}
format("yml") {
target("**/*.yml")
leadingTabsToSpaces()
trimTrailingWhitespace()
endWithNewline()
}
}