-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
46 lines (36 loc) · 1.2 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
import org.gradle.api.Project
import org.gradle.jvm.tasks.Jar
buildscript {
val extra = project.extensions.extraProperties
extra["kotlinVersion"] = "1.1.0-dev-1159"
extra["repo"] = "https://repo.gradle.org/gradle/repo"
repositories {
maven { setUrl(extra["repo"]) }
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${extra["kotlinVersion"]}")
}
}
apply {
plugin("kotlin")
plugin<ApplicationPlugin>()
}
configure<ApplicationPluginConvention> {
mainClassName = "example.MainKt"
}
jar {
baseName = "kotlin-jetty-jersey-example"
version = "0.1.0"
}
repositories {
maven { setUrl(extra["repo"]) }
}
dependencies {
compile("org.jetbrains.kotlin:kotlin-stdlib:${extra["kotlinVersion"]}")
compile("org.glassfish.jersey.containers:jersey-container-jetty-http:2.23.1")
compile("org.glassfish.jersey.media:jersey-media-json-jackson:2.23.1")
compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.5.5-2")
testCompile("org.spockframework:spock-core:1.0-groovy-2.4")
testCompile("org.jetbrains.spek:spek:1.0.25")
}
inline fun Project.jar(crossinline configuration: Jar.() -> Unit) = tasks.withType(configuration)