-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
142 lines (124 loc) · 4.94 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
buildscript {
ext.ktor_version = '2.2.2'
ext.h2_version = '2.1.214'
ext.postgres_version = '42.5.1'
ext.exposed_version = '0.41.1'
ext.hikari_version = '5.0.1'
ext.flyway_version = '9.11.0'
ext.flexmark_version = '0.64.0'
ext.handlebars_version = '4.3.1'
ext.commons_email_version = '1.5'
ext.bcrypt_version = '0.9.0'
ext.totp_version = '2.4.0'
ext.logback_version = '1.4.5'
ext.konf_version = '1.1.2'
ext.commonslang_version = '3.12.0'
ext.skedule_version = '0.4.0'
ext.kotlinx_coroutines_test_version = '1.6.4'
ext.rest_assured_version = '5.3.0'
ext.junit_version = '5.9.1'
ext.assertj_version = '3.24.1'
ext.mockk_version = '1.13.3'
ext.wiremock_version = '2.35.0'
}
plugins {
id 'application'
id 'org.jetbrains.kotlin.jvm' version '1.8.0'
id 'org.jetbrains.kotlinx.kover' version '0.6.1'
}
version = "1.4.0"
sourceSets {
testIntegration {
java.srcDir 'src/testIntegration/java'
kotlin.srcDir 'src/testIntegration/kotlin'
resources.srcDir 'src/testIntegration/resources'
compileClasspath += main.output
runtimeClasspath += main.output
}
}
configurations {
testIntegrationImplementation.extendsFrom testImplementation
testIntegrationRuntime.extendsFrom testRuntime
}
task testIntegration(type: Test) {
testClassesDirs = sourceSets.testIntegration.output.classesDirs
classpath = sourceSets.testIntegration.runtimeClasspath
}
tasks.withType(Copy) {
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
}
task createProperties() {
doLast {
def file = new File("$buildDir/resources/main/version.txt")
file.getParentFile().mkdirs()
file.text = project.version.toString()
}
}
classes {
dependsOn createProperties
}
repositories {
mavenCentral()
}
test {
useJUnitPlatform()
systemProperty "CONFIG_MODE", "TEST"
testLogging {
events "failed"
exceptionFormat "full"
}
}
application {
mainClass = "lynks.MainKt"
}
compileKotlin {
kotlinOptions.useK2 = true
}
compileTestKotlin {
kotlinOptions.useK2 = true
}
compileTestIntegrationKotlin {
kotlinOptions.useK2 = true
}
dependencies {
implementation "io.ktor:ktor-server-core:$ktor_version"
implementation "io.ktor:ktor-server-netty:$ktor_version"
implementation "io.ktor:ktor-server-status-pages:$ktor_version"
implementation "io.ktor:ktor-server-default-headers:$ktor_version"
implementation "io.ktor:ktor-server-forwarded-header:$ktor_version"
implementation "io.ktor:ktor-server-compression:$ktor_version"
implementation "io.ktor:ktor-server-partial-content:$ktor_version"
implementation "io.ktor:ktor-server-call-logging:$ktor_version"
implementation "io.ktor:ktor-server-call-id:$ktor_version"
implementation "io.ktor:ktor-server-content-negotiation:$ktor_version"
implementation "io.ktor:ktor-server-websockets:$ktor_version"
implementation "io.ktor:ktor-server-auth:$ktor_version"
implementation "io.ktor:ktor-server-sessions:$ktor_version"
implementation "io.ktor:ktor-serialization-jackson:$ktor_version"
implementation "com.h2database:h2:$h2_version"
implementation "org.postgresql:postgresql:$postgres_version"
implementation "org.jetbrains.exposed:exposed-core:$exposed_version"
implementation "org.jetbrains.exposed:exposed-jdbc:$exposed_version"
implementation "com.zaxxer:HikariCP:$hikari_version"
implementation "org.flywaydb:flyway-core:$flyway_version"
implementation "com.vladsch.flexmark:flexmark:$flexmark_version"
implementation "com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:$flexmark_version"
implementation "com.vladsch.flexmark:flexmark-ext-gfm-tasklist:$flexmark_version"
implementation "com.vladsch.flexmark:flexmark-ext-tables:$flexmark_version"
implementation "com.vladsch.flexmark:flexmark-ext-autolink:$flexmark_version"
implementation "com.github.shyiko.skedule:skedule:$skedule_version"
implementation "com.github.jknack:handlebars:$handlebars_version"
implementation "org.apache.commons:commons-email:$commons_email_version"
implementation "at.favre.lib:bcrypt:$bcrypt_version"
implementation "dev.turingcomplete:kotlin-onetimepassword:$totp_version"
implementation "org.apache.commons:commons-lang3:$commonslang_version"
implementation "ch.qos.logback:logback-classic:$logback_version"
implementation "com.uchuhimo:konf-core:$konf_version"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinx_coroutines_test_version"
testImplementation "io.rest-assured:rest-assured:$rest_assured_version"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
testImplementation "org.assertj:assertj-core:$assertj_version"
testImplementation "io.mockk:mockk:$mockk_version"
testImplementation "com.github.tomakehurst:wiremock-jre8:$wiremock_version"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
}