diff --git a/build.gradle b/build.gradle index a3bb0090..49c2e69b 100644 --- a/build.gradle +++ b/build.gradle @@ -26,6 +26,12 @@ allprojects { kotlin { jvmToolchain(libs.versions.java.compilation.get().toInteger()) } + + tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask).configureEach { + compilerOptions { + freeCompilerArgs.add("-Xlambdas=class") + } + } } pluginManager.withPlugin("java-gradle-plugin") { configurations { diff --git a/jvm/src/main/kotlin/com/project/starter/modules/plugins/KotlinLibraryPlugin.kt b/jvm/src/main/kotlin/com/project/starter/modules/plugins/KotlinLibraryPlugin.kt index 9c6d6b4c..27891c95 100644 --- a/jvm/src/main/kotlin/com/project/starter/modules/plugins/KotlinLibraryPlugin.kt +++ b/jvm/src/main/kotlin/com/project/starter/modules/plugins/KotlinLibraryPlugin.kt @@ -53,5 +53,13 @@ class KotlinLibraryPlugin : Plugin { } } } + + pluginManager.withPlugin("java-gradle-plugin") { + tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask::class.java).configureEach { + compilerOptions { + freeCompilerArgs.add("-Xlambdas=class") + } + } + } } }