-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
80 lines (70 loc) · 1.83 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
78
79
80
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0")
classpath(libs.ktlint)
}
}
plugins {
application
kotlin("jvm") version "2.0.0"
id("jacoco")
alias(libs.plugins.ktlint)
}
ktlint {
version.set("0.48.2")
}
group = "com.target.slack"
version = "2.2.2"
repositories {
mavenCentral()
}
application {
mainClass.set("com.target.slack.SlackApplicationKt")
group = "com.target.slack"
java.sourceCompatibility = JavaVersion.VERSION_17
}
configurations.all {
exclude(group = "ch.qos.logback")
}
dependencies {
implementation(libs.liteForJdbc)
implementation(libs.postgresql)
implementation(libs.bundles.flyway)
implementation(libs.okhttp)
implementation(libs.bundles.scrimage)
implementation(libs.bundles.bolt)
implementation(libs.http4kCore)
implementation(libs.bundles.hoplite)
implementation(libs.bundles.jackson)
implementation(libs.websocket)
implementation(libs.tyrusClient)
implementation(libs.bundles.slf4j)
testImplementation("com.h2database:h2:2.2.224")
testImplementation(kotlin("test-junit"))
}
val jvmTargetVersion: String by project
tasks {
withType<Jar> {
isEnabled = true
manifest {
attributes["Implementation-Version"] = version
}
}
withType<Tar> {
archiveFileName.set("emoji_manager.tar")
}
withType<Test> {
dependsOn(":db-migration:flywayMigrate")
useJUnit()
}
java { toolchain { languageVersion.set(JavaLanguageVersion.of(jvmTargetVersion)) } }
}
tasks.test {
finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
}
tasks.jacocoTestReport {
dependsOn(tasks.test) // tests are required to run before generating the report
}