generated from justuser-31/code_projects_template
43 lines
905 B
Plaintext
43 lines
905 B
Plaintext
plugins {
|
|
kotlin("jvm") version "2.1.10"
|
|
application
|
|
}
|
|
|
|
group = "org.example"
|
|
version = "1.0-SNAPSHOT"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation(kotlin("test"))
|
|
implementation("com.beust:klaxon:5.5")
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(17)
|
|
}
|
|
|
|
// "run" task
|
|
application {
|
|
mainClass.set("org.example.MainKt") // Replace with your actual main class
|
|
}
|
|
|
|
tasks.register<JavaExec>("runWithInput") {
|
|
group = "application"
|
|
mainClass.set("org.server.MainKt")
|
|
classpath = sourceSets["main"].runtimeClasspath
|
|
standardInput = System.`in` // 👈 enables readln() or readLine()
|
|
}
|
|
tasks.register<JavaExec>("runWithInputClient") {
|
|
group = "application"
|
|
mainClass.set("org.client.ClientKt")
|
|
classpath = sourceSets["main"].runtimeClasspath
|
|
standardInput = System.`in` // 👈 enables readln() or readLine()
|
|
}
|