import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { id("org.jetbrains.kotlin.jvm") application } group = "com.estateunified" version = "0.1.0" java { sourceCompatibility = JavaVersion.VERSION_21 targetCompatibility = JavaVersion.VERSION_21 } tasks.withType().configureEach { options.release.set(21) } kotlin { compilerOptions { jvmTarget.set(JvmTarget.JVM_21) } } application { mainClass.set("com.estateunified.panel.MainKt") applicationDefaultJvmArgs = listOf( "-Dfile.encoding=UTF-8", "-Dstdout.encoding=UTF-8", "-Dstderr.encoding=UTF-8", ) } dependencies { implementation("io.ktor:ktor-server-core-jvm:2.3.12") implementation("io.ktor:ktor-server-netty-jvm:2.3.12") implementation("io.ktor:ktor-server-cors-jvm:2.3.12") implementation("com.google.code.gson:gson:2.11.0") } // The frontend is authored in /FrontEnd but served from the classpath // (src/main/resources/panel). Sync it on every build so edits in /FrontEnd // always reach the running server — no manual copying, no stale frontend. val syncFrontend by tasks.registering(Sync::class) { from(rootProject.file("FrontEnd")) into(layout.projectDirectory.dir("src/main/resources/panel")) } tasks.named("processResources") { dependsOn(syncFrontend) }