forked from nicole-terc/composable-sheep
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
39 lines (34 loc) · 1.44 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
// TODO: get plugins from version catalog once this issue is tackled: https://youtrack.jetbrains.com/issue/KTIJ-19369
@Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
plugins {
id(libs.plugins.android.application.get().pluginId).version(libs.versions.gradle.get()).apply(false)
id(libs.plugins.android.library.get().pluginId).version(libs.versions.gradle.get()).apply(false)
id(libs.plugins.kotlin.android.get().pluginId).version(libs.versions.kotlin.get()).apply(false)
kotlin(libs.plugins.kotlin.serialization.get().pluginId).version(libs.versions.kotlin.get())
id(libs.plugins.ktlint.get().pluginId).version(libs.versions.ktlint.get())
id(libs.plugins.detekt.get().pluginId).version(libs.versions.detekt.get())
}
buildscript {
dependencies {
classpath(libs.hilt.classpath)
}
}
subprojects {
apply(plugin = Plugins.ktlint)
apply(plugin = Plugins.detekt)
detekt {
config = files("$rootDir/${ModuleExtension.FilePath.detekt}")
buildUponDefaultConfig = true
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class).all {
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-Xopt-in=androidx.compose.material3.ExperimentalMaterial3Api",
"-Xopt-in=androidx.compose.animation.ExperimentalAnimationApi",
)
}
}
}
tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}