-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
75 lines (61 loc) · 1.76 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
version = 1
val gradle_version = "4.9"
val kotlin_version = "1.2.51"
val spark_version = "2.7.2"
val slf4j_version = "1.8.0-beta2"
val spek_version = "1.1.5"
val junit_platform_version = "1.3.0-M1"
val kluent_version = "1.32"
val mainClass = "jks.postnummer.RunnerKt"
plugins {
application
kotlin("jvm") version "1.2.51"
}
buildscript {
dependencies {
classpath("org.junit.platform:junit-platform-gradle-plugin:1.2.0")
}
}
application {
mainClassName = "$mainClass"
}
dependencies {
compile("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
compile("com.sparkjava:spark-core:$spark_version")
compile("org.slf4j:slf4j-simple:$slf4j_version")
testCompile("org.jetbrains.spek:spek-api:$spek_version") {
exclude(group = "org.jetbrains.kotlin")
}
testCompile("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
testCompile("org.amshove.kluent:kluent:$kluent_version")
testRuntime("org.junit.platform:junit-platform-runner:$junit_platform_version")
testRuntime("org.jetbrains.spek:spek-junit-platform-engine:$spek_version") {
exclude(group = "org.jetbrains.kotlin")
}
}
repositories {
jcenter()
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_10
targetCompatibility = JavaVersion.VERSION_1_10
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
tasks.withType<Wrapper> {
gradleVersion = "4.9"
}
val fatJar = task("fatJar", type = Jar::class) {
baseName = "${project.name}-all"
manifest {
attributes["Implementation-Title"] = "${project.name}"
attributes["Main-Class"] = "$mainClass"
}
from(configurations.runtime.map { if (it.isDirectory) it else zipTree(it) })
with(tasks["jar"] as CopySpec)
}