-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
80 lines (70 loc) · 2.52 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
78
79
80
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.7.10"
id("io.gitlab.arturbosch.detekt") version "1.14.0"
application
}
group = "me.maxim"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven(url = "https://dl.bintray.com/kotest/kotest")
maven(url = "https://plugins.gradle.org/m2/")
}
dependencies {
val versions = mapOf(
"kotlinTest" to "1.3.72",
"rxJava" to "2.2.20",
"kotlinStdLib" to "1.3.72",
"kotlinCoroutinesCore" to "1.3.7",
"kotlinCoroutinesRx2" to "1.3.7",
"kotestAssertionsCore" to "4.2.2",
"kotestRunnerJunit5" to "4.2.2",
"junit" to "4.13.1"
)
val libs = mapOf(
"kotlinTest" to kotlin("test"),
"kotlinReflect" to "org.jetbrains.kotlin:kotlin-reflect",
"rxJava" to "io.reactivex.rxjava2:rxjava",
"kotlinStdLib" to "org.jetbrains.kotlin:kotlin-stdlib-jdk7",
"kotlinCoroutinesCore" to "org.jetbrains.kotlinx:kotlinx-coroutines-core",
"kotlinCoroutinesRx2" to "org.jetbrains.kotlinx:kotlinx-coroutines-rx2",
"kotestAssertionsCore" to "io.kotest:kotest-assertions-core",
"kotestRunnerJunit5" to "io.kotest:kotest-runner-junit5",
"junit" to "junit:junit"
)
testImplementation(libs["kotlinTest"]!!)
implementation("${libs["kotlinReflect"]}:${versions["kotlinTest"]}")
implementation("${libs["rxJava"]}:${versions["rxJava"]}")
implementation("${libs["kotlinStdLib"]}:${versions["kotlinStdLib"]}")
implementation("${libs["kotlinCoroutinesCore"]}:${versions["kotlinCoroutinesCore"]}")
implementation("${libs["kotlinCoroutinesRx2"]}:${versions["kotlinCoroutinesRx2"]}")
testImplementation("${libs["kotestAssertionsCore"]}:${versions["kotestAssertionsCore"]}")
testImplementation("${libs["kotestRunnerJunit5"]}:${versions["kotestRunnerJunit5"]}")
testImplementation("${libs["junit"]}:${versions["junit"]}")
implementation("io.gitlab.arturbosch.detekt:detekt-cli:1.12.0")
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
detekt {
autoCorrect = true
// config = files("${project.rootDir}/detekt.yml")
input = files("src/main/kotlin")
reports {
xml.enabled = true
html.enabled = false
txt.enabled = false
}
}
tasks.withType<Detekt> {
group = "verification"
description = "Run static code analysis with detekt"
}
application {
mainClass.set("MainKt")
}