This repository has been archived by the owner on Jan 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
61 lines (53 loc) · 1.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
plugins {
id("maven")
id("java")
kotlin("jvm") version "1.4.32"
id("org.jlleitschuh.gradle.ktlint") version "10.0.0"
id("jacoco")
}
group = "com.mapk"
version = "0.20"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("reflect"))
// https://mvnrepository.com/artifact/org.jetbrains/annotations
compileOnly(group = "org.jetbrains", name = "annotations", version = "20.1.0")
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter
testImplementation(group = "org.junit.jupiter", name = "junit-jupiter", version = "5.7.1") {
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
}
// https://mvnrepository.com/artifact/io.mockk/mockk
testImplementation("io.mockk:mockk:1.11.0")
}
tasks {
compileKotlin {
dependsOn("ktlintFormat")
kotlinOptions {
jvmTarget = "1.8"
allWarningsAsErrors = true
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
}
test {
useJUnitPlatform()
// テスト終了時にjacocoのレポートを生成する
finalizedBy(jacocoTestReport)
}
jacocoTestReport {
reports {
xml.isEnabled = true
csv.isEnabled = false
html.isEnabled = true
}
}
}