59 lines
1.3 KiB
Kotlin
59 lines
1.3 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.microutils:kotlin-logging-jvm:3.0.5")
|
|
implementation("ch.qos.logback:logback-classic:1.5.13")
|
|
implementation("org.jline:jline:3.27.1")
|
|
|
|
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")
|
|
applicationDefaultJvmArgs = listOf(
|
|
"--enable-native-access=ALL-UNNAMED",
|
|
"-Dslf4j.internal.verbosity=WARN"
|
|
)
|
|
}
|
|
|
|
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")
|
|
}
|
|
|
|
tasks.withType<JavaExec> {
|
|
jvmArgs("--enable-native-access=ALL-UNNAMED")
|
|
} |