-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
77 lines (61 loc) · 2.2 KB
/
build.gradle.kts
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
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
import org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED
import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED
val ktorVersion: String = project.property("ktor_version") as String
val kotlinVersion: String = project.property("kotlin_version") as String
val logbackVersion: String = project.property("logback_version") as String
val postgresVersion: String = project.property("postgres_version") as String
plugins {
kotlin("jvm") version "2.0.20"
id("io.ktor.plugin") version "2.3.12"
id("org.jetbrains.kotlin.plugin.serialization") version "2.0.20"
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
}
group = "org.rogervinas"
version = "0.0.1"
application {
mainClass.set("org.rogervinas.GreetingApplicationKt")
val isDevelopment: Boolean = project.ext.has("development")
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment")
}
ktor {
docker {
localImageName.set("${project.name}")
imageTag.set("${project.version}")
jreVersion.set(JavaVersion.VERSION_21)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation("io.ktor:ktor-server-core-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-netty-jvm:$ktorVersion")
implementation("io.ktor:ktor-serialization-kotlinx-json-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-content-negotiation-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-config-yaml")
implementation("org.postgresql:postgresql:$postgresVersion")
implementation("com.bettercloud:vault-java-driver:5.1.0")
implementation("ch.qos.logback:logback-classic:$logbackVersion")
testImplementation("io.ktor:ktor-server-tests-jvm:$ktorVersion")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5:$kotlinVersion")
testImplementation("io.mockk:mockk:1.13.12")
testImplementation("org.testcontainers:junit-jupiter:1.20.2")
testImplementation("org.assertj:assertj-core:3.26.3")
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
kotlin {
compilerOptions {
freeCompilerArgs.addAll("-Xjsr305=strict")
}
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events(PASSED, SKIPPED, FAILED)
}
}