-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
71 lines (53 loc) · 1.86 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
plugins {
val kotlinVersion = "2.0.21"
id("java")
id("application")
kotlin("jvm") version kotlinVersion
kotlin("plugin.jpa") version kotlinVersion
}
group = "${project.group}"
version = "${project.version}"
java {
sourceCompatibility = JavaVersion.VERSION_21
}
kotlin {
jvmToolchain(21)
}
application {
mainClass.set("${"${project.group}.${project.name}".lowercase()}.MainKt")
}
repositories {
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/ch.qos.logback/logback-classic
implementation("ch.qos.logback:logback-classic:1.5.12")
// https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-reflect
implementation("org.jetbrains.kotlin:kotlin-reflect:2.0.21")
// https://mvnrepository.com/artifact/com.google.code.gson/gson
implementation("com.google.code.gson:gson:2.11.0")
// https://mvnrepository.com/artifact/io.github.cdimascio/dotenv-kotlin
implementation("io.github.cdimascio:dotenv-kotlin:6.4.2")
// https://mvnrepository.com/artifact/io.insert-koin/koin-core
implementation("io.insert-koin:koin-core:4.0.0")
kotlin("stdlib")
listOf(project(":common"), project(":chatbot"), project(":webserver")).forEach {
implementation(it)
}
}
tasks.withType<Jar> {
manifest {
attributes["Main-Class"] = application.mainClass
}
from(sourceSets.main.get().output)
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.named<JavaExec>("run") {
systemProperty("logback.configurationFile", "logback-debug.xml")
}