forked from prof18/feed-flow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
74 lines (66 loc) · 2.68 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
import io.gitlab.arturbosch.detekt.extensions.DetektExtension.Companion.DEFAULT_SRC_DIR_JAVA
import io.gitlab.arturbosch.detekt.extensions.DetektExtension.Companion.DEFAULT_SRC_DIR_KOTLIN
import io.gitlab.arturbosch.detekt.extensions.DetektExtension.Companion.DEFAULT_TEST_SRC_DIR_JAVA
import io.gitlab.arturbosch.detekt.extensions.DetektExtension.Companion.DEFAULT_TEST_SRC_DIR_KOTLIN
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.multiplatform) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.sqldelight) apply false
alias(libs.plugins.triplet.play) apply false
alias(libs.plugins.compose.multiplatform) apply false
alias(libs.plugins.native.coroutines) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.about.libraries) apply false
alias(libs.plugins.crashlytics) apply false
alias(libs.plugins.detekt)
alias(libs.plugins.org.jetbrains.kotlin.jvm) apply false
}
tasks.register("clean", Delete::class) {
delete(layout.buildDirectory.get())
}
allprojects {
apply {
plugin(rootProject.libs.plugins.detekt.get().pluginId)
}
dependencies {
detektPlugins(rootProject.libs.io.gitlab.arturbosch.detekt.formatting) {
exclude(group = "org.slf4j", module = "slf4j-nop")
}
}
detekt {
source.setFrom(
files(
"src",
DEFAULT_SRC_DIR_JAVA,
DEFAULT_TEST_SRC_DIR_JAVA,
DEFAULT_SRC_DIR_KOTLIN,
DEFAULT_TEST_SRC_DIR_KOTLIN,
),
)
toolVersion = rootProject.libs.versions.detekt.get()
config.setFrom(rootProject.files("config/detekt/detekt.yml"))
parallel = true
autoCorrect = true
}
}
subprojects {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
if (project.findProperty("composeCompilerReports") == "true") {
freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=${layout.buildDirectory.get().asFile.absolutePath}/compose_compiler"
)
}
if (project.findProperty("composeCompilerMetrics") == "true") {
freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=${layout.buildDirectory.get().asFile.absolutePath}/compose_compiler"
)
}
}
}
}