-
Notifications
You must be signed in to change notification settings - Fork 0
Core Setup
MerlinTHS edited this page Feb 17, 2023
·
3 revisions
Kavas dependencies are hosted on Maven Central, so make sure to include it as a repository.
repositories {
mavenCentral()
}Add the core dependency.
dependencies {
implementation("io.github.merlinths:kava-core:1.0.0")
}Kava uses Context Receivers,
a feature introduced in Kotlin 1.6.20,
which is currently JVM-only. Since it's still experimental you
have to add -Xcontext-receivers as an additional compiler
argument.
For jvm single-platform projects.
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xcontext-receivers")
}
}For a multi-platform projects.
kotlin {
jvm {
compilations.all {
kotlinOptions {
freeCompilerArgs = listOf("-Xcontext-receivers")
}
}
}
}There are two templates to get started a bit easier.