80 lines
2.0 KiB
Kotlin
80 lines
2.0 KiB
Kotlin
plugins {
|
|
id("scala")
|
|
id("org.scoverage")
|
|
}
|
|
|
|
group = "de.nowchess"
|
|
version = "1.0-SNAPSHOT"
|
|
|
|
@Suppress("UNCHECKED_CAST")
|
|
val versions = rootProject.extra["VERSIONS"] as Map<String, String>
|
|
@Suppress("UNCHECKED_CAST")
|
|
val scoverageExcluded = rootProject.extra["SCOVERAGE_EXCLUDED"] as List<String>
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
scala {
|
|
scalaVersion = versions["SCALA3"]!!
|
|
}
|
|
|
|
scoverage {
|
|
scoverageVersion.set(versions["SCOVERAGE"]!!)
|
|
excludedPackages.set(
|
|
listOf(
|
|
"de\\.nowchess\\.bot\\.bots\\.NNUEBot",
|
|
"de\\.nowchess\\.bot\\.bots\\.nnue\\..*",
|
|
"de\\.nowchess\\.bot\\.util\\.PolyglotBook",
|
|
)
|
|
)
|
|
excludedFiles.set(scoverageExcluded)
|
|
}
|
|
|
|
tasks.withType<ScalaCompile> {
|
|
scalaCompileOptions.additionalParameters = listOf("-encoding", "UTF-8")
|
|
}
|
|
|
|
dependencies {
|
|
|
|
compileOnly("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:rule"))
|
|
implementation("com.microsoft.onnxruntime:onnxruntime:${versions["ONNXRUNTIME"]!!}")
|
|
|
|
testImplementation(project(":modules:io"))
|
|
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)
|
|
}
|
|
tasks.reportScoverage {
|
|
dependsOn(tasks.test)
|
|
}
|
|
|
|
tasks.jar {
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
}
|