-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathbuild.gradle.kts
40 lines (38 loc) · 1.39 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.cachefix) apply false
alias(libs.plugins.hilt.android) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.ktlint.gradle)
alias(libs.plugins.gradle.versions)
}
allprojects {
plugins.withType<JavaBasePlugin>().configureEach {
extensions.configure<JavaPluginExtension> {
toolchain {
languageVersion.set(
JavaLanguageVersion.of(rootProject.libs.versions.javaVersion.get().toInt())
)
}
}
}
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
allWarningsAsErrors = true
freeCompilerArgs.addAll(
"-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
)
}
}
apply(plugin = rootProject.libs.plugins.ktlint.gradle.get().pluginId)
ktlint {
version.set(rootProject.libs.versions.ktlint.asProvider())
android.set(true)
}
}