64 lines
1.7 KiB
Kotlin
64 lines
1.7 KiB
Kotlin
plugins {
|
|
kotlin("jvm")
|
|
kotlin("kapt")
|
|
}
|
|
|
|
group = rootProject.group
|
|
version = rootProject.version
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
jcenter()
|
|
}
|
|
|
|
val kotlinVersion = properties["version.kotlin"].toString()
|
|
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 junitVersion = properties["version.junit"].toString()
|
|
val striktVersion = properties["version.strikt"].toString()
|
|
val guavaVersion = properties["version.guava"].toString()
|
|
|
|
dependencies {
|
|
// Kotlin
|
|
api("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
|
|
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion}")
|
|
|
|
// JSON
|
|
kapt("com.squareup.moshi:moshi-kotlin-codegen:${moshiVersion}")
|
|
api("com.squareup.moshi:moshi:${moshiVersion}")
|
|
|
|
// Netty
|
|
api("io.netty:netty-buffer:${nettyVersion}")
|
|
|
|
// Other
|
|
api("com.google.guava:guava:$guavaVersion")
|
|
|
|
// Testing
|
|
testImplementation("io.strikt:strikt-core:${striktVersion}")
|
|
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
|
|
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
|
|
}
|
|
|
|
kotlin {
|
|
sourceSets["main"].kotlin.srcDir("src/main/generatedKotlin")
|
|
|
|
sourceSets.all {
|
|
languageSettings.enableLanguageFeature("InlineClasses")
|
|
}
|
|
}
|
|
|
|
tasks {
|
|
compileKotlin {
|
|
kotlinOptions.freeCompilerArgs = listOf(
|
|
"-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
|
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
|
|
"-progressive"
|
|
)
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
}
|