2021-11-07 13:53:41 +01:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
2021-09-25 12:24:28 +02:00
|
|
|
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"
|
2021-11-07 13:53:41 +01:00
|
|
|
id("com.github.johnrengelman.shadow") version "7.1.0"
|
2021-09-25 12:24:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "de.pheerai.buzzer"
|
|
|
|
version = "0.0.1"
|
2021-11-07 13:53:41 +01:00
|
|
|
|
2021-09-25 12:24:28 +02:00
|
|
|
application {
|
|
|
|
mainClass.set("de.pheerai.buzzer.ApplicationKt")
|
2021-11-07 13:53:41 +01:00
|
|
|
applicationDefaultJvmArgs = listOf("--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED", "-Dio.netty.tryReflectionSetAccessible=true")
|
2021-09-25 12:24:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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")
|
|
|
|
}
|
2021-11-07 13:53:41 +01:00
|
|
|
|
|
|
|
tasks {
|
|
|
|
withType<JavaCompile>().configureEach {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_11.toString()
|
|
|
|
targetCompatibility = JavaVersion.VERSION_11.toString()
|
|
|
|
}
|
|
|
|
|
|
|
|
withType<KotlinCompile>().configureEach {
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = JavaVersion.VERSION_11.toString()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|