Using old JVM backend
java.lang.IllegalStateException: The provided plugin org.jetbrains.kotlin.samWithReceiver.SamWithReceiverComponentRegistrar is not compatible with this version of compiler
I was able to get it running by downgrading to gradle 6.7.1. It looks they added a dependency to the sam-receiver in v6.8.
kotlin-sam-with-receiver-compiler-plugin-1.4.20
neugartf
06/07/2021, 7:40 AM
So is this now a bug in gradle or in the scripting library š?
i
ilya.chernikov
06/14/2021, 7:56 AM
As far as I remember, gradle used sam-with-receiver plugin almost from the beginning, so the issue is definitely not a new dependency.
But could you please give some more details how and where you're using the scripting compiler?
Is it a part of your gradle plugin?
n
neugartf
06/24/2021, 8:52 PM
Hey @ilya.chernikov, thanks for responding! I created a minimal reproducible case here [1]. I think the problem might be related that I use the compiler in the
Hi @neugartf
Thanks for the repro! I checked it quickly, seems the problem is in the interference of the Kotlin compiler infrastructure embedded into Gradle, and the one that scripting compiler trying to create when compiling your script. The
buildSrc
stuff is executed inside Gradle, as far as I know, without much isolation (by design, to ensure that it can access necessary Gradle infrastructure without issues), so you cannot use any version of the kotlin libs there. But I tried to set it to 1.4.32 (used in the Gradle 7.1 you're using in the repro project), and it doesn't help, so the problem are deeper.
I created an issue to track the problem - https://youtrack.jetbrains.com/issue/KT-47453
Meanwhile your only option so far is to run these scrips out of process, I guess.