-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
104 lines (85 loc) · 2.47 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.kotlin.dsl.startScripts
import org.jetbrains.dokka.gradle.DokkaTask
plugins {
kotlin("jvm") version "1.3.50"
application
jacoco
id("org.jetbrains.dokka") version "0.10.0"
}
repositories {
mavenCentral()
jcenter()
}
configurations.forEach { it.exclude("org.slf4j", "slf4j-log4j12") }
dependencies {
implementation(kotlin("stdlib-jdk8"))
/* Logging */
implementation("org.slf4j:slf4j-simple:1.7.29")
implementation("io.github.microutils:kotlin-logging:1.7.6")
/* REST */
implementation("com.sparkjava:spark-kotlin:1.0.0-alpha")
/* CLI */
implementation("com.github.ajalt:clikt:2.3.0")
/* Reader */
implementation("com.github.doyaaaaaken:kotlin-csv-jvm:0.7.3")
/* Graph Output */
implementation("com.github.sh0nk:matplotlib4j:0.4.0")
/* Testing */
testImplementation("io.kotlintest:kotlintest-runner-junit5:3.4.2")
testImplementation("io.mockk:mockk:1.9.3")
}
application {
mainClassName = "bin/CLIKt"
}
tasks {
startScripts {
applicationName = "fpg"
}
register<DokkaTask>("htmlDokka") {
outputFormat = "html"
outputDirectory = "$buildDir/dokka"
configuration {
includeNonPublic = false
skipDeprecated = true
skipEmptyPackages = true
jdkVersion = 8
includes = listOf("packages.md")
}
}
val dokka by getting(DokkaTask::class) {
doFirst { // delete old docs
delete(fileTree("docs"))
}
outputFormat = "gfm"
outputDirectory = "docs"
configuration {
moduleName = "docs"
includeNonPublic = false
skipDeprecated = true
skipEmptyPackages = true
jdkVersion = 8
includes = listOf("src/docs/packages.md")
}
doLast { // move the docs from ./docs/docs to ./docs (Dokka can't output to a single directory level...)
ant.withGroovyBuilder {
"move"("file" to "./docs/docs", "todir" to ".")
}
}
}
jar { // add html dokka to the jar task
dependsOn(dokka, "htmlDokka")
}
jacocoTestReport {
reports {
xml.isEnabled = true
html.isEnabled = false
}
}
val test by getting(Test::class) {
useJUnitPlatform { }
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
}