I decided to move my build logic into a gradle plugin for deduplication, but when calling
apply<KotlinMultiplatformPluginWrapper>()
I get the error
Copy code
Caused by: org.gradle.api.internal.AbstractMutationGuard$IllegalMutationException: Project#afterEvaluate(Action) on project '...' cannot be executed in the current context.
at org.jetbrains.kotlin.gradle.plugin.KotlinMultiplatformPluginKt.whenEvaluated(KotlinMultiplatformPlugin.kt:236)
What should I do to fix this?
t
tapchicoma
12/21/2022, 9:31 AM
I think it depends on your plugin code. Generally such message indicates your plugin tries to apply MPP plugin in some configuration action. For example such approach may cause it: