Enable context receivers for all compilations

This commit is contained in:
Iaroslav Postovalov 2022-04-04 18:27:35 +07:00
parent 1fe019da21
commit b4058925ee
No known key found for this signature in database
GPG Key ID: 46E15E4A31B3BCD7

View File

@ -44,7 +44,7 @@ public fun Project.configureKScience(
tasks.withType<KotlinJvmCompile> {
kotlinOptions {
jvmTarget = KScienceVersions.JVM_TARGET.toString()
freeCompilerArgs = freeCompilerArgs + defaultJvmArgs
freeCompilerArgs = freeCompilerArgs + defaultJvmArgs + "-Xcontext-receivers"
}
}
@ -141,6 +141,14 @@ public fun Project.configureKScience(
}
}
targets.all {
compilations.all {
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + "-Xcontext-receivers"
}
}
}
sourceSets.all {
languageSettings.applySettings(kotlinVersion)
}