diff --git a/src/main/kotlin/ru/mipt/npm/gradle/commonConfigurations.kt b/src/main/kotlin/ru/mipt/npm/gradle/commonConfigurations.kt index de1b304..0374f66 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/commonConfigurations.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/commonConfigurations.kt @@ -44,7 +44,7 @@ public fun Project.configureKScience( tasks.withType { 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) }