-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
78 lines (58 loc) · 1.92 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
73
74
75
76
77
@file:Suppress("GradlePackageUpdate")
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val kotlinVersion: String by project
val kotlinSerializationVersion = "1.3.2"
val junitVersion = "5.8.2"
val detektVersion = "1.19.0"
plugins {
val kotlinVersion = "1.6.10"
val detektVersion = "1.19.0"
kotlin("jvm") version kotlinVersion
kotlin("plugin.serialization") version kotlinVersion
id("io.gitlab.arturbosch.detekt") version detektVersion
id("org.jetbrains.kotlin.plugin.allopen") version kotlinVersion
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-bom")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.2")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializationVersion")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:$detektVersion")
}
detekt {
config = files("$rootDir/detekt-config.yml")
buildUponDefaultConfig = true
}
java.sourceCompatibility = JavaVersion.VERSION_11
tasks {
withType<Detekt> {
autoCorrect = true
enabled = true
}
withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "11"
}
}
withType<Test> {
useJUnitPlatform()
}
register<Exec>("viewDetektReport") {
commandLine("open", "build/reports/detekt/detekt.html")
}
register<Exec>("viewTestReport") {
commandLine("open", "build/reports/tests/test/index.html")
}
jar {
enabled = false
}
}
defaultTasks("clean", "build")