-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
124 lines (101 loc) · 3.37 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id "io.gitlab.arturbosch.detekt" version "1.11.0-RC1"
id "org.jmailen.kotlinter" version "3.4.4"
id "org.jetbrains.dokka" version "0.10.1"
id "jacoco"
}
apply plugin: 'kotlin'
apply plugin: 'application'
group 'com.softwaret'
version '0.0.1'
mainClassName = "io.ktor.server.netty.EngineMain"
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = ["-Xinline-classes", "-Xopt-in=kotlin.contracts.ExperimentalContracts"]
}
}
tasks.detekt.jvmTarget = "1.8"
sourceSets {
main.kotlin.srcDirs = main.java.srcDirs = ['src']
test.kotlin.srcDirs = test.java.srcDirs = ['test']
main.resources.srcDirs = ['resources']
test.resources.srcDirs = ['testresources']
}
repositories {
mavenLocal()
jcenter()
maven { url 'https://kotlin.bintray.com/ktor' }
maven { url 'https://kotlin.bintray.com/kotlin-js-wrappers' }
}
dependencies {
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
// Ktor
implementation "io.ktor:ktor-server-netty:$ktor_version"
implementation "io.ktor:ktor-server-core:$ktor_version"
implementation "io.ktor:ktor-client-core:$ktor_version"
implementation "io.ktor:ktor-client-core-jvm:$ktor_version"
implementation "io.ktor:ktor-client-apache:$ktor_version"
implementation "io.ktor:ktor-jackson:$ktor_version"
implementation "io.ktor:ktor-locations:$ktor_version"
// Log
implementation "ch.qos.logback:logback-classic:$logback_version"
// Log in non framework classes
implementation "io.github.microutils:kotlin-logging:$micro_logger_version"
// Kodein DI
implementation "org.kodein.di:kodein-di-framework-ktor-server-jvm:$kodein_version"
// H2 Database
implementation "com.h2database:h2:$h2_database_version"
// Exposed
implementation "org.jetbrains.exposed:exposed-core:$exposed_version"
implementation "org.jetbrains.exposed:exposed-dao:$exposed_version"
implementation "org.jetbrains.exposed:exposed-jdbc:$exposed_version"
// JWT tokens
implementation "io.ktor:ktor-auth-jwt:$ktor_version"
// Detekt
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:$detekt_version"
// Tests
testImplementation "io.ktor:ktor-server-tests:$ktor_version"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit5:$kotlin_version"
testImplementation "io.mockk:mockk:$mockk_version"
testImplementation(platform('org.junit:junit-bom:5.6.2'))
testImplementation('org.junit.jupiter:junit-jupiter')
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
showStandardStreams = true
}
finalizedBy jacocoTestReport
}
detekt {
input = files(rootProject.rootDir)
buildUponDefaultConfig = true
config.setFrom(files("$rootDir/resources/detekt.yml"))
autoCorrect = true
}
dokka {
outputFormat = 'html'
outputDirectory = "$buildDir/dokka"
}
jacoco {
toolVersion = "0.8.7"
reportsDirectory = file("$buildDir/reports")
}
jacocoTestReport {
reports {
xml.enabled = true
}
}