forked from wireapp/poll-bot
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
106 lines (88 loc) · 3.21 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
106 lines (88 loc) · 3.21 KB
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
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType
plugins {
kotlin("jvm") version "2.4.10"
application
id("com.gradleup.shadow") version "9.6.1"
id("org.jlleitschuh.gradle.ktlint") version "14.2.0"
id("io.gitlab.arturbosch.detekt") version "1.23.8"
id("net.nemerosa.versioning") version "4.0.1"
}
group = "com.wire.apps.polls"
version = versioning.info?.tag ?: versioning.info?.lastTag ?: "development"
application {
mainClass.set("com.wire.apps.polls.PollAppKt")
}
repositories {
mavenCentral()
}
dependencies {
implementation("com.wire", "wire-apps-jvm-sdk", "0.2.0")
// stdlib
implementation(kotlin("stdlib-jdk8"))
// extension functions
implementation("pw.forst", "katlib", "2.0.3")
// Ktor server dependencies
val ktorVersion = "3.2.3"
implementation("io.ktor", "ktor-server-core", ktorVersion)
implementation("io.ktor", "ktor-server-netty", ktorVersion)
// logging
implementation("net.logstash.logback", "logstash-logback-encoder", "8.1")
implementation("ch.qos.logback", "logback-classic", "1.5.19")
implementation("io.github.oshai", "kotlin-logging", "8.0.4")
// metrics
implementation("io.ktor", "ktor-server-metrics-micrometer", ktorVersion)
implementation("io.micrometer", "micrometer-registry-prometheus", "1.16.0")
// DI
implementation("org.kodein.di", "kodein-di-framework-ktor-server-jvm", "7.28.0")
// database
implementation("org.postgresql", "postgresql", "42.2.20")
val exposedVersion = "0.33.1"
implementation("org.jetbrains.exposed", "exposed-core", exposedVersion)
implementation("org.jetbrains.exposed", "exposed-dao", exposedVersion)
implementation("org.jetbrains.exposed", "exposed-jdbc", exposedVersion)
implementation("org.jetbrains.exposed", "exposed-java-time", exposedVersion)
implementation("pw.forst", "exposed-upsert", "1.1.0")
// database migrations from the code
implementation("org.flywaydb", "flyway-core", "7.8.2")
// testing
testImplementation(kotlin("test"))
testImplementation("io.kotest", "kotest-assertions-core", "5.8.1")
testImplementation("io.mockk", "mockk", "1.13.16")
testImplementation("org.jetbrains.kotlinx", "kotlinx-coroutines-test", "1.7.3")
testImplementation("org.junit.jupiter", "junit-jupiter-params", "5.10.0")
testImplementation("io.ktor", "ktor-server-test-host", ktorVersion)
}
ktlint {
verbose.set(true)
outputToConsole.set(true)
coloredOutput.set(true)
reporters {
reporter(ReporterType.CHECKSTYLE)
reporter(ReporterType.JSON)
reporter(ReporterType.HTML)
}
}
detekt {
toolVersion = "1.23.7"
config.setFrom(file("$rootDir/config/detekt/detekt.yml"))
baseline = file("$rootDir/config/detekt/baseline.xml")
parallel = true
buildUponDefaultConfig = true
source.setFrom("src/main/kotlin")
}
kotlin {
jvmToolchain(21)
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
}
tasks {
named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") {
mergeServiceFiles()
duplicatesStrategy = DuplicatesStrategy.INCLUDE
archiveBaseName = "poll-app"
}
build {
dependsOn(shadowJar)
}
}