import org.jetbrains.kotlin.gradle.tasks.KotlinCompile val ktor_version: String by project val kotlin_version: String by project val logback_version: String by project val kotlinx_html_version: String by project plugins { application kotlin("jvm") version "1.5.31" id("com.github.johnrengelman.shadow") version "7.1.0" } group = "de.pheerai.buzzer" version = "0.0.1" application { mainClass.set("de.pheerai.buzzer.ApplicationKt") applicationDefaultJvmArgs = listOf("--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED", "-Dio.netty.tryReflectionSetAccessible=true") } repositories { mavenCentral() } dependencies { implementation("io.ktor:ktor-server-core:$ktor_version") implementation("io.ktor:ktor-websockets:$ktor_version") implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:$kotlinx_html_version") implementation("io.ktor:ktor-html-builder:$ktor_version") implementation("io.ktor:ktor-server-netty:$ktor_version") implementation("ch.qos.logback:logback-classic:$logback_version") testImplementation("io.ktor:ktor-server-tests:$ktor_version") testImplementation("org.jetbrains.kotlin:kotlin-test:$kotlin_version") } tasks { withType().configureEach { sourceCompatibility = JavaVersion.VERSION_11.toString() targetCompatibility = JavaVersion.VERSION_11.toString() } withType().configureEach { kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } } }