-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
61 lines (52 loc) · 1.51 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
import io.gitlab.arturbosch.detekt.extensions.DetektExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
repositories {
mavenCentral()
}
}
plugins {
base
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.detekt) apply false
alias(libs.plugins.dotenv)
}
allprojects {
group = "net.olegg.aoc"
version = "2024.0.0"
repositories {
mavenCentral()
}
apply(plugin = rootProject.libs.plugins.kotlin.jvm.get().pluginId)
apply(plugin = rootProject.libs.plugins.detekt.get().pluginId)
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
allWarningsAsErrors.set(true)
freeCompilerArgs.set(
listOf(
"-Xsuppress-version-warnings",
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=kotlin.ExperimentalStdlibApi",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=kotlinx.coroutines.FlowPreview",
)
)
}
}
extensions.configure<KotlinProjectExtension> {
jvmToolchain(17)
}
extensions.configure<DetektExtension> {
config.from(rootProject.files("detekt.yml"))
buildUponDefaultConfig = true
baseline = rootProject.file("detekt-baseline.xml")
autoCorrect = true
}
dependencies {
val implementation by configurations
val detektPlugins by configurations
implementation(rootProject.libs.kotlinx.coroutines.core)
detektPlugins(rootProject.libs.detekt.formatting)
}
}