Files
NowChessSystems/modules/server/build.gradle.kts
T
LQ63 25c113e4d5
Build & Test (NowChessSystems) TeamCity build failed
feat(server): Http4s server
Added http4s server according to the API specification. A game is playable via API
2026-04-12 18:15:04 +02:00

80 lines
2.1 KiB
Kotlin

import org.gradle.jvm.tasks.Jar
plugins {
id("scala")
id("org.scoverage") version "8.1"
application
}
group = "de.nowchess"
version = "1.0-SNAPSHOT"
@Suppress("UNCHECKED_CAST")
val versions = rootProject.extra["VERSIONS"] as Map<String, String>
repositories {
mavenCentral()
}
scala {
scalaVersion = versions["SCALA3"]!!
}
scoverage {
scoverageVersion.set(versions["SCOVERAGE"]!!)
excludedPackages.set(listOf("de.nowchess.server"))
}
application {
mainClass.set("de.nowchess.server.ServerApp")
}
tasks.withType<ScalaCompile> {
scalaCompileOptions.additionalParameters = listOf("-encoding", "UTF-8")
}
tasks.named<Jar>("jar") {
duplicatesStrategy = org.gradle.api.file.DuplicatesStrategy.EXCLUDE
}
dependencies {
implementation("org.scala-lang:scala3-compiler_3") {
version { strictly(versions["SCALA3"]!!) }
}
implementation("org.scala-lang:scala3-library_3") {
version { strictly(versions["SCALA3"]!!) }
}
implementation(project(":modules:api"))
implementation(project(":modules:core"))
implementation(project(":modules:io"))
implementation(project(":modules:rule"))
val http4s = versions["HTTP4S"]!!
val circe = versions["CIRCE"]!!
implementation("org.http4s:http4s-ember-server_3:$http4s")
implementation("org.http4s:http4s-dsl_3:$http4s")
implementation("org.http4s:http4s-circe_3:$http4s")
implementation("io.circe:circe-core_3:$circe")
implementation("io.circe:circe-generic_3:$circe")
implementation("io.circe:circe-parser_3:$circe")
testImplementation(platform("org.junit:junit-bom:${versions["JUNIT_BOM"]!!}"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.scalatest:scalatest_3:${versions["SCALATEST"]!!}")
testImplementation("co.helmethair:scalatest-junit-runner:${versions["SCALATEST_JUNIT"]!!}")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.test {
useJUnitPlatform {
includeEngines("scalatest")
testLogging {
events("skipped", "failed")
}
}
finalizedBy(tasks.reportScoverage)
}