bill-ktor/build.gradle.kts

69 lines
2.4 KiB
Plaintext
Raw Permalink Normal View History

2022-10-18 17:20:50 +08:00
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 = "1.0.1"
2022-10-18 17:20:50 +08:00
application {
mainClass.set("cn.fadinglight.ApplicationKt")
val isDevelopment: Boolean = project.ext.has("development")
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment")
}
tasks.withType<Jar> {
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")
2022-10-28 05:02:55 +08:00
implementation("io.ktor:ktor-server-auth:$ktor_version")
2022-10-18 17:20:50 +08:00
// 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:$ktor_version")
implementation("io.ktor:ktor-server-locations-jvm:$ktor_version")
testImplementation("io.ktor:ktor-server-tests-jvm:$ktor_version")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version")
}