plugins {
    kotlin("jvm") version "2.0.0"
    application
    distribution
}

application {
    mainClass.set("xyz.maxwellj.chookchat.MainKt")
    layout.buildDirectory.dir("distributions/")
}

group = "xyz.maxwellj.chookchat"
version = "0.0.1"

repositories {
    mavenCentral()
}

tasks.withType<Jar> {
    manifest {
        attributes["Main-Class"] = "xyz.maxwellj.chookchat.MainKt"
    }
}

dependencies {
    testImplementation(kotlin("test"))
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
    implementation("io.javalin:javalin:6.3.0")
    implementation("org.slf4j:slf4j-simple:2.0.16")
    implementation("org.json:json:20230618")
}

tasks.test {
    useJUnitPlatform()
}
kotlin {
    jvmToolchain(17)
}
