fixup! fixup! Add ktor dependencies and basic server

This commit is contained in:
William Brawner 2021-07-06 09:48:48 -06:00
parent 6f94dedbe3
commit 7020cc15a5

View file

@ -4,6 +4,7 @@ plugins {
java java
kotlin("jvm") kotlin("jvm")
id("org.springframework.boot") id("org.springframework.boot")
application
} }
apply(plugin = "io.spring.dependency-management") apply(plugin = "io.spring.dependency-management")
@ -24,6 +25,7 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion") implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
implementation("io.ktor:ktor-server-core:$ktorVersion") implementation("io.ktor:ktor-server-core:$ktorVersion")
implementation("io.ktor:ktor-server-cio:$ktorVersion") implementation("io.ktor:ktor-server-cio:$ktorVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0")
implementation("ch.qos.logback:logback-classic:1.2.3") implementation("ch.qos.logback:logback-classic:1.2.3")
implementation("org.springframework.boot:spring-boot-starter-data-jpa") implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-security") implementation("org.springframework.boot:spring-boot-starter-security")
@ -38,10 +40,14 @@ description = "twigs-server"
val twigsMain = "com.wbrawner.twigs.server.TwigsServerApplication" val twigsMain = "com.wbrawner.twigs.server.TwigsServerApplication"
application {
mainClass.set(twigsMain)
}
tasks.bootJar { tasks.bootJar {
mainClassName = twigsMain mainClassName = twigsMain
} }
tasks.bootRun { tasks.bootRun {
main = twigsMain mainClass.set(twigsMain)
} }