martmists
12/21/2022, 2:58 AMapply<KotlinMultiplatformPluginWrapper>() I get the error
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?tapchicoma
12/21/2022, 9:31 AMtasks.named("some-task") {
project.plugins.apply<KotlinMultiplatformPluginWrapper>()
}martmists
12/21/2022, 12:52 PMopen class MyPlugin : Plugin<Project> {
override fun apply(target: Project) = with(target) {
apply<KotlinMultiplatformPluginWrapper>()
}
}tapchicoma
12/21/2022, 12:53 PMmartmists
12/21/2022, 12:58 PMval jvmMain by sourceSets.registering in the kotlin{} block caused it, strangetapchicoma
12/21/2022, 12:59 PMby sourceSets.creating to eager create source settapchicoma
12/21/2022, 12:59 PM