-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
40 lines (35 loc) · 1.43 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
plugins {
kotlin("jvm") version "1.6.10"
kotlin("plugin.serialization") version "1.6.10"
id("org.jlleitschuh.gradle.ktlint") version "10.2.1"
}
repositories {
mavenCentral()
}
dependencies {
implementation(group = "org.postgresql", name = "postgresql", version = "42.+")
implementation(group = "org.http4k", name = "http4k-core", version = "4.20.2.0")
implementation(group = "org.http4k", name = "http4k-server-jetty", version = "4.20.2.0")
implementation(group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version = "1.3.2")
implementation(group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version = "0.3.2")
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.register<Copy>("copyRuntimeDependencies") {
into("build/libs")
from(configurations.runtimeClasspath)
}
// gradlew.bat launch
tasks.register<JavaExec>("launch") {
group = "launch"
this.mainClass.set("pt.isel.ls.sports.AppLaunchKt")
classpath = sourceSets["main"].runtimeClasspath
}
tasks.named<Jar>("jar") {
dependsOn("copyRuntimeDependencies")
manifest {
attributes["Main-Class"] = "pt.isel.ls.sports.AppLaunchKt"
attributes["Class-Path"] = configurations.runtimeClasspath.get().joinToString(" ") { it.name }
}
}