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
72 lines (63 loc) · 1.58 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
plugins {
id("maven")
kotlin("jvm") version "1.5.21"
// プロダクションコード以外
id("org.jlleitschuh.gradle.ktlint") version "10.1.0"
id("jacoco")
id("me.champeau.gradle.jmh") version "0.5.3"
}
group = "com.mapk"
version = "0.1.5"
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("reflect"))
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter
testImplementation(group = "org.junit.jupiter", name = "junit-jupiter", version = "5.7.2") {
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
}
testImplementation("io.mockk:mockk:1.12.0")
}
tasks {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
}
// https://qiita.com/wrongwrong/items/16fa10a7f78a31830ed8
jmhJar {
exclude("META-INF/versions/9/module-info.class")
}
jacocoTestReport {
reports {
xml.isEnabled = true
csv.isEnabled = false
html.isEnabled = true
}
}
test {
useJUnitPlatform()
// テスト終了時にjacocoのレポートを生成する
finalizedBy(jacocoTestReport)
}
}
jmh {
warmupForks = 2
warmupBatchSize = 3
warmupIterations = 3
warmup = "1s"
fork = 2
batchSize = 3
iterations = 2
timeOnIteration = "1500ms"
failOnError = true
isIncludeTests = false
resultFormat = "CSV"
}