Emil Kantis
11/26/2022, 2:02 PM* What went wrong:
A problem occurred configuring project ':kotest-framework:kotest-framework-multiplatform-plugin-gradle'.
> Failed to notify project evaluation listener.
> org.jetbrains.kotlin.gradle.plugin.KotlinGradleSubplugin: Provider org.jetbrains.kotlin.samWithReceiver.gradle.SamWithReceiverGradleSubplugin not a subtype
> org.jetbrains.kotlin.gradle.plugin.KotlinGradleSubplugin: Provider org.jetbrains.kotlin.samWithReceiver.gradle.SamWithReceiverGradleSubplugin not a subtype
ephemient
11/26/2022, 2:35 PMplugins { kotlin() }
and `plugins { kotlin-dsl
}` in the same project. this leads to problems when Gradle's embedded Kotlin version differs from your project's Kotlin version. notably, Gradle 7.6 embeds Kotlin 1.7.10Emil Kantis
11/26/2022, 3:46 PMAdam S
11/27/2022, 10:29 AMembeddedKotlinVersion
// buildSrc/build.gradle.kts
plugins {
// set the version of Kotlin that Gradle uses
kotlin("jvm") version embeddedKotlinVersion
`kotlin-dsl`
}
dependencies {
// set the version of Kotlin used to build/run the project
val kotlinVer = "1.7.21"
implementation(platform(kotlin("bom", kotlinVer)))
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVer")
implementation("org.jetbrains.kotlin:kotlin-serialization:$kotlinVer")
}
Chris Lee
11/27/2022, 11:25 AMephemient
11/27/2022, 12:03 PMkotlin-dsl
}` and `plugins { embedded-kotlin
}`, but if you want to use plugins { kotlin() }
you're better off separating them into separate (possible included) builds