forked from mjstrasser/ktor-features-zipkin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
72 lines (57 loc) · 2.27 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
repositories {
jcenter()
}
}
plugins {
kotlin("jvm") version "1.3.31"
`maven-publish`
id("com.jfrog.bintray") version "1.8.0"
}
group = "com.michaelstrasser"
version = "0.2.1"
repositories {
jcenter()
maven("https://dl.bintray.com/kotlin/ktor")
}
dependencies {
val kotlinVersion = "1.3.31"
val ktorVersion = "1.2.1"
val junit5Version = "5.4.0"
val spekVersion = "2.0.3"
val assertkVersion = "0.14"
implementation(group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version = kotlinVersion)
implementation(group = "io.ktor", name = "ktor-server-core", version = ktorVersion)
implementation(group = "io.ktor", name = "ktor-client-core", version = ktorVersion)
implementation(group = "io.ktor", name = "ktor-client-core-jvm", version = ktorVersion)
testImplementation(group = "io.ktor", name = "ktor-client-mock", version = ktorVersion)
testImplementation(group = "io.ktor", name = "ktor-client-mock-jvm", version = ktorVersion)
testImplementation(group = "io.ktor", name = "ktor-server-tests", version = ktorVersion)
testImplementation(group = "org.junit.jupiter", name = "junit-jupiter-api", version = junit5Version)
testRuntimeOnly(group = "org.junit.jupiter", name = "junit-jupiter-engine", version = junit5Version)
testImplementation(group = "com.willowtreeapps.assertk", name = "assertk-jvm", version = assertkVersion)
// Override the version in Spek.
testImplementation(kotlin(module = "reflect", version = kotlinVersion))
testImplementation(group = "org.spekframework.spek2", name = "spek-dsl-jvm", version = spekVersion)
testRuntimeOnly(group = "org.spekframework.spek2", name = "spek-runner-junit5", version = spekVersion)
}
tasks.test {
useJUnitPlatform()
dependsOn("cleanTest")
}
tasks.withType<KotlinCompile> {
kotlinOptions.freeCompilerArgs = listOf("-Xuse-experimental=kotlin.Experimental")
}
tasks.register<Jar>("sourcesJar") {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
publishing {
publications {
create<MavenPublication>("mavenKotlin") {
from(components["kotlin"])
artifact(tasks["sourcesJar"])
}
}
}