-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.gradle.kts
73 lines (67 loc) · 1.65 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
plugins {
id("com.android.application") apply false
id("com.android.library") apply false
id("com.diffplug.spotless").version(Versions.spotless)
id("com.gradleup.auto.manifest").version("1.0.4")
}
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath(kotlin("gradle-plugin", version = Versions.Kotlin.lang))
classpath("de.mannodermaus.gradle.plugins:android-junit5:1.8.0.0")
}
}
allprojects {
configRepository()
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = Versions.Java.jvmTarget
allWarningsAsErrors = false
freeCompilerArgs = listOf(
"-Xopt-in=kotlin.RequiresOptIn",
"-Xallow-unstable-dependencies"
)
}
}
apply(plugin = "com.diffplug.spotless")
spotless {
kotlin {
target("**/*.kt")
targetExclude(
"$buildDir/**/*.kt",
"bin/**/*.kt",
"buildSrc/**/*.kt",
"**/*Response.kt",
)
ktlint(Versions.ktlint).userData(
mapOf(
"indent_size" to "2",
"continuation_indent_size" to "2"
)
)
// licenseHeaderFile(rootProject.file("spotless/license"))
}
kotlinGradle {
target("*.gradle.kts")
targetExclude(
"feature/focuskit/**"
)
ktlint(Versions.ktlint).userData(
mapOf(
"indent_size" to "2",
"continuation_indent_size" to "2"
)
)
}
}
// 剔除livedata,使用flow代替
configurations.all {
exclude(group = "androidx.lifecycle", module = "lifecycle-livedata")
}
}
autoManifest {
packageName.set(Package.applicationId)
}