-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
99 lines (83 loc) · 2.73 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'kotlin'
apply plugin: 'application'
group ''
version '0.0.1'
mainClassName = 'ApplicationKt'
sourceSets {
main.kotlin.srcDirs = main.java.srcDirs = ['src']
test.kotlin.srcDirs = test.java.srcDirs = ['test']
main.resources.srcDirs = ['resources']
test.resources.srcDirs = ['testresources']
}
repositories {
mavenCentral()
jcenter()
maven { url 'https://kotlin.bintray.com/ktor' }
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "io.ktor:ktor-server-netty:$ktor_version"
compile "ch.qos.logback:logback-classic:$logback_version"
compile "io.ktor:ktor-server-core:$ktor_version"
compile "io.ktor:ktor-jackson:$ktor_version"
//dependency injection
compile("org.koin:koin-core:$koinVersion")
compile("org.koin:koin-core-ext:$koinVersion")
compile("org.koin:koin-ktor:$koinVersion")
compile("org.koin:koin-logger-slf4j:$koinVersion")
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.9.10'
//config
compile("com.uchuhimo:konf:$uchuhimo_version")
//db orm
//in memorydb
compile "com.h2database:h2:$h2_version"
//orm
compile "org.jetbrains.exposed:exposed:$exposed_version"
//connection pooling
compile "com.zaxxer:HikariCP:$hikari_version"
//migration
compile "org.flywaydb:flyway-core:$fly_way"
//logging
compile("ch.qos.logback.contrib:logback-json-classic:0.1.5")
compile("ch.qos.logback.contrib:logback-jackson:0.1.5")
compile("io.github.microutils:kotlin-logging:1.7.6")
//testing
testCompile "org.assertj:assertj-core:$assertj_version"
testCompile "org.junit.jupiter:junit-jupiter-engine:$jupiter_version"
testCompile "com.h2database:h2:$h2_version"
testCompile "io.ktor:ktor-server-tests:$ktor_version"
testCompile "org.koin:koin-test:$koinVersion"
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
tasks.withType(Test) {
useJUnitPlatform()
}
jar.enabled = true
jar {
archiveName = 'Revolute.jar'
manifest {
attributes "Main-Class": mainClassName
}
from(configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) }) {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
}
clean.doFirst {
delete "${rootDir}" + File.separator + "target" + File.separator
delete "${rootDir}" + File.separator + "build" + File.separator
delete "${rootDir}" + File.separator + "logs" + File.separator
}