val ktor_version: String by project val kotlin_version: String by project val logback_version: String by project val exposed_version: String by project plugins { application kotlin("jvm") version "1.7.20" id("io.ktor.plugin") version "2.1.2" id("org.jetbrains.kotlin.plugin.serialization") version "1.7.20" id("com.github.johnrengelman.shadow") version "5.0.0" } group = "cn.fadinglight" version = "0.0.1" application { mainClass.set("cn.fadinglight.ApplicationKt") val isDevelopment: Boolean = project.ext.has("development") applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment") } tasks.withType { manifest { attributes( mapOf( "Main-Class" to application.mainClass ) ) } } repositories { maven("https://maven.aliyun.com/repository/public/") mavenLocal() mavenCentral() } dependencies { // Exposed ORM library implementation("org.jetbrains.exposed:exposed-core:$exposed_version") implementation("org.jetbrains.exposed:exposed-dao:$exposed_version") implementation("org.jetbrains.exposed:exposed-jdbc:$exposed_version") implementation("com.zaxxer:HikariCP:5.0.1") // JDBC Connection Pool implementation("org.mariadb.jdbc:mariadb-java-client:3.0.8") // JDBC Connector for Mariadb // Session implementation("io.ktor:ktor-server-sessions:$ktor_version") // Ktor implementation("io.ktor:ktor-server-call-logging:$ktor_version") implementation("io.ktor:ktor-server-content-negotiation-jvm:$ktor_version") implementation("io.ktor:ktor-server-core-jvm:$ktor_version") implementation("io.ktor:ktor-serialization-kotlinx-json-jvm:$ktor_version") implementation("io.ktor:ktor-server-compression-jvm:$ktor_version") implementation("io.ktor:ktor-server-netty-jvm:$ktor_version") implementation("io.ktor:ktor-server-locations:$ktor_version") implementation("ch.qos.logback:logback-classic:$logback_version") implementation("io.ktor:ktor-server-websockets-jvm:2.1.1") implementation("io.ktor:ktor-server-locations-jvm:2.1.1") testImplementation("io.ktor:ktor-server-tests-jvm:$ktor_version") testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version") }