50 lines
1.5 KiB
Text
50 lines
1.5 KiB
Text
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")
|
|
id("com.github.johnrengelman.shadow")
|
|
}
|
|
|
|
group = "de.pheerai.buzzer"
|
|
version = "0.0.3"
|
|
|
|
application {
|
|
mainClass.set("de.pheerai.buzzer.ApplicationKt")
|
|
applicationDefaultJvmArgs =
|
|
listOf("--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED", "-Dio.netty.tryReflectionSetAccessible=true")
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
google()
|
|
}
|
|
|
|
dependencies {
|
|
implementation("io.ktor:ktor-server-core:$ktor_version")
|
|
implementation("io.ktor:ktor-server-netty:$ktor_version")
|
|
implementation("io.ktor:ktor-server-websockets:$ktor_version")
|
|
implementation("io.ktor:ktor-server-html-builder:$ktor_version")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:$kotlinx_html_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<JavaCompile>().configureEach {
|
|
sourceCompatibility = JavaVersion.VERSION_17.toString()
|
|
targetCompatibility = JavaVersion.VERSION_17.toString()
|
|
}
|
|
|
|
withType<KotlinCompile>().configureEach {
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
|
}
|
|
}
|
|
}
|