-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
43 lines (36 loc) · 1.4 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.8.10"
kotlin("plugin.serialization") version "1.8.10"
id("org.jlleitschuh.gradle.ktlint") version "11.3.1"
}
repositories {
mavenCentral()
}
dependencies {
implementation(group = "org.postgresql", name = "postgresql", version = "42.+")
implementation(group = "org.http4k", name = "http4k-core", version = "4.40.+")
implementation(group = "org.http4k", name = "http4k-server-jetty", version = "4.40.+")
implementation(group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version = "1.5.+")
implementation(group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version = "0.4.+")
implementation(group = "org.slf4j", name = "slf4j-api", version = "2.0.0-alpha5")
runtimeOnly(group = "org.slf4j", name = "slf4j-simple", version = "2.0.0-alpha5")
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
tasks.named<Jar>("jar") {
dependsOn("copyRuntimeDependencies")
manifest {
attributes["Main-Class"] = "pt.isel.ls.http.HTTPServerKt"
attributes["Class-Path"] = configurations.runtimeClasspath.get().joinToString(" ") { it.name }
}
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
tasks.register<Copy>("copyRuntimeDependencies") {
into("build/libs")
from(configurations.runtimeClasspath)
}