-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
50 lines (39 loc) · 1.41 KB
/
build.gradle.kts
File metadata and controls
50 lines (39 loc) · 1.41 KB
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
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.ktlint) apply false
alias(libs.plugins.detekt)
kotlin("jvm") version "1.8.22" apply false
}
subprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
apply(plugin = "io.gitlab.arturbosch.detekt")
group = "com.pkware.filesystem"
repositories {
mavenCentral()
}
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
freeCompilerArgs.addAll(
"-Xjvm-default=all",
"-Xinline-classes",
"-opt-in=kotlin.contracts.ExperimentalContracts",
"-Xjsr305=strict",
// Ensure assertions don't add performance cost. See https://youtrack.jetbrains.com/issue/KT-22292
"-Xassertions=jvm"
)
}
}
dependencies {
detektPlugins(project.dependencies.create("com.pkware.detekt:import-extension:1.2.0"))
}
tasks.withType<Test> { useJUnitPlatform() }
tasks.withType<Detekt>().configureEach {
jvmTarget = tasks.named<KotlinCompile>("compileKotlin").get().compilerOptions.jvmTarget.get().target
parallel = true
config.from(rootProject.file("detekt.yml"))
buildUponDefaultConfig = true
}
}