58 lines
1.4 KiB
Kotlin
58 lines
1.4 KiB
Kotlin
plugins {
|
|
kotlin("jvm")
|
|
kotlin("kapt")
|
|
}
|
|
|
|
group = rootProject.group
|
|
version = rootProject.version
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
jcenter()
|
|
}
|
|
|
|
val spekVersion = properties["version.spek"].toString()
|
|
val moshiVersion = properties["version.moshi"].toString()
|
|
val coroutinesVersion = properties["version.kotlinx-coroutines"].toString()
|
|
val nettyVersion = properties["version.netty"].toString()
|
|
val slf4jVersion = properties["version.slf4j"].toString()
|
|
|
|
dependencies {
|
|
// Kotlin
|
|
implementation(kotlin("reflect"))
|
|
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion}")
|
|
|
|
// JSON
|
|
kapt("com.squareup.moshi:moshi-kotlin-codegen:${moshiVersion}")
|
|
api("com.squareup.moshi:moshi:${moshiVersion}")
|
|
|
|
// Logging
|
|
api("org.slf4j:slf4j-api:${slf4jVersion}")
|
|
|
|
// Netty
|
|
api("io.netty:netty-buffer:${nettyVersion}")
|
|
|
|
// Testing
|
|
testImplementation("io.strikt:strikt-core:0.26.1")
|
|
testImplementation("org.spekframework.spek2:spek-dsl-jvm:$spekVersion")
|
|
testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:$spekVersion")
|
|
}
|
|
|
|
tasks {
|
|
compileKotlin {
|
|
kotlinOptions.jvmTarget = "1.8"
|
|
kotlinOptions.freeCompilerArgs = listOf(
|
|
"-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
|
|
)
|
|
}
|
|
|
|
compileTestKotlin {
|
|
kotlinOptions.jvmTarget = "1.8"
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform {
|
|
includeEngines("spek2")
|
|
}
|
|
}
|
|
}
|