-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
56 lines (48 loc) · 1.41 KB
/
build.gradle
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
/**
* This section is for all of the plugins we need to make this work.
* Kotlin, the fat jar builder, and flag it
* as an application so `./gradlew run` will work
*/
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.21'
id 'com.github.johnrengelman.shadow' version '4.0.4'
}
apply plugin: 'application'
/**
* Standard dependency section for gradle.
* Define the kotlin standard library for
* Java 8.
*/
repositories {
mavenCentral()
}
def jerseyVersion = "2.28"
dependencies {
compile 'org.jetbrains.kotlin:kotlin-stdlib'
compile "org.glassfish.jersey.containers:jersey-container-grizzly2-http:${jerseyVersion}"
compile "org.glassfish.jersey.inject:jersey-hk2:${jerseyVersion}"
compile "org.glassfish.jersey.media:jersey-media-json-jackson:${jerseyVersion}"
compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.8")
}
/**
* Personal preference. I hate having src/main/kotlin
* be the root, so I change it that 'src'
* as the root of my source directory.
*/
sourceSets {
main.kotlin.srcDirs += 'src'
}
// Define the main startup class and jar name
mainClassName = 'ServerKt'
archivesBaseName = 'step-by-step-kotlin-hello-world-jaxrs'
// tell the jar which class to startup in.
jar {
manifest {
attributes 'Main-Class': 'ServerKt'
}
}
// Properties for `./gradlew run`
run {
standardInput = System.in
environment = ["SHUTDOWN_TYPE" : "INPUT"]
}