-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
80 lines (61 loc) · 2.3 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
buildscript {
ext.kotlin_version = '1.3.21'
ext.ktor_version = '1.1.3'
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
//Kotlin, the fat jar builder
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.0-rc-190'
id 'com.github.johnrengelman.shadow' version '4.0.1'
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'application'
mainClassName = 'io.ktor.server.tomcat.DevelopmentEngine'
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
sourceSets {
main.kotlin.srcDirs = [ 'src/main/kotlin' ]
main.resources.srcDirs = [ 'src/main/resources' ]
test.kotlin.srcDirs = [ 'src/test/kotlin' ]
}
repositories {
mavenCentral()
maven { url "https://dl.bintray.com/kotlin/exposed" }
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "io.ktor:ktor-server-tomcat:$ktor_version"
compile "io.ktor:ktor-gson:$ktor_version"
compile "io.ktor:ktor-metrics:$ktor_version"
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.11.2'
compile group: 'io.github.microutils', name: 'kotlin-logging', version: '1.6.25'
runtime group: 'org.postgresql', name: 'postgresql', version: '42.2.5'
runtime group: 'com.h2database', name: 'h2', version: '1.4.197'
compile group: 'com.zaxxer', name: 'HikariCP', version: '3.3.1'
compile group: 'org.jetbrains.exposed', name: 'exposed', version: '0.10.5'
compile group: 'org.flywaydb', name: 'flyway-core', version: '5.1.4'
compile group: 'com.typesafe', name:'config', version: '1.3.2'
testCompile group: 'io.kotlintest', name: 'kotlintest-runner-junit5', version: '3.1.10'
testCompile "io.ktor:ktor-server-test-host:$ktor_version"
}
// Define the main startup class and jar name
mainClassName = 'com.sample.employee.EmployeeApiServerKt'
archivesBaseName = 'kotlin-ktor-exposed-sample-api'
jar {
manifest {
attributes 'Main-Class': 'com.sample.employee.EmployeeApiServerKt'
}
}