-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
108 lines (88 loc) · 2.46 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = "com.npwork"
version = "1.0.0-SNAPSHOT"
plugins {
id("org.jetbrains.kotlin.jvm") version "1.3.41"
id("org.jlleitschuh.gradle.ktlint") version "9.1.1"
id("io.gitlab.arturbosch.detekt") version "1.4.0"
id("info.solidsoft.pitest") version "1.4.6"
id("com.star-zero.gradle.githook") version "1.2.0"
jacoco
maven
}
val mainClass: String by project
val tornadoFxVersion = "1.7.19"
val junitVersion = "5.5.2"
repositories {
jcenter()
mavenCentral()
maven(url = "https://jitpack.io")
maven(url = "https://plugins.gradle.org/m2")
}
dependencies {
// Kotlin
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("com.github.wnameless:json-flattener:0.2.2")
implementation("khttp:khttp:1.0.0")
implementation("com.google.code.gson:gson:2.8.6")
implementation("com.github.mmazi:rescu:1.6.0")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.10.+")
implementation("com.google.guava:guava:20.0")
implementation("ch.qos.logback:logback-classic:1.2.3")
// Test dependencies
testImplementation("org.junit.jupiter:junit-jupiter:$junitVersion")
testImplementation("org.assertj:assertj-core:3.14.0")
testImplementation("io.mockk:mockk:1.9.3")
}
detekt {
failFast = true
buildUponDefaultConfig = true
config = files("gradle/detekt/detekt.yml")
reports {
html.enabled = true
xml.enabled = false
txt.enabled = false
}
}
tasks.test {
useJUnitPlatform()
failFast = true
testLogging {
events("passed", "skipped", "failed")
}
configure<JacocoTaskExtension> {
isEnabled = true
}
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.allWarningsAsErrors = true
}
tasks.wrapper {
gradleVersion = "6.1"
}
jacoco {
toolVersion = "0.8.5"
}
pitest {
targetClasses.add("com.cardiolyse.holter.*")
outputFormats.add("HTML")
}
githook {
createHooksDirIfNotExist = true
hooks {
create("pre-commit") {
task = "build -x test"
shell = "echo 'Build successful'"
}
}
}
tasks.jacocoTestReport {
executionData.setFrom(fileTree(buildDir).include("/jacoco/*.exec"))
reports {
xml.isEnabled = false
csv.isEnabled = false
html.isEnabled = true
}
}