51 lines
1.0 KiB
Kotlin
51 lines
1.0 KiB
Kotlin
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
plugins {
|
|
kotlin("jvm") version "2.0.21"
|
|
id("com.github.johnrengelman.shadow") version "8.1.1"
|
|
application
|
|
}
|
|
|
|
group = "org.example"
|
|
version = "1.0.0"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation(kotlin("stdlib"))
|
|
implementation("io.github.oshai:kotlin-logging-jvm:7.0.3")
|
|
implementation("org.slf4j:slf4j-simple:2.0.3")
|
|
|
|
testImplementation(kotlin("test"))
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
|
|
testImplementation("io.mockk:mockk:1.13.13")
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
}
|
|
|
|
application {
|
|
mainClass.set("MainKt")
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(17)
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
tasks.named<ShadowJar>("shadowJar") {
|
|
archiveBaseName.set("lab5")
|
|
archiveClassifier.set("")
|
|
archiveVersion.set("1.0.0")
|
|
manifest {
|
|
attributes["Main-Class"] = "MainKt"
|
|
}
|
|
}
|
|
|
|
tasks.named("build") {
|
|
dependsOn("shadowJar")
|
|
}
|