47 lines
996 B
Kotlin
47 lines
996 B
Kotlin
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
plugins {
|
|
kotlin("jvm") version "2.3.0"
|
|
application
|
|
}
|
|
|
|
group = "ru.thiflict"
|
|
version = "1.0-SNAPSHOT"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation(kotlin("test"))
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
|
|
|
|
// Логирование
|
|
implementation("org.slf4j:slf4j-simple:2.0.9")
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(21)
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
application {
|
|
mainClass.set("ru.thiflict.Mainkt")
|
|
}
|
|
|
|
tasks.jar {
|
|
manifest {
|
|
attributes["Main-Class"] = "ru.thiflict.MainKt" // Укажите ваш главный класс
|
|
}
|
|
|
|
// Включить зависимости в JAR (fat JAR)
|
|
from(configurations.runtimeClasspath.get().map {
|
|
if (it.isDirectory) it else zipTree(it)
|
|
})
|
|
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
} |