Slackbot
11/17/2023, 11:40 PMThomas Broyer
11/18/2023, 1:16 AMapply false to not actually apply it, but still add it to the classloader that'll be used as a parent classloader for every subproject (therefore sharing the exact same Kotlin classes).
More concretely: add a build.gradle.kts at the root (next to the settings.gradle.kts with the following content:
plugins {
plugin("kotlin-convention") apply false
}Vampire
11/18/2023, 5:16 AMIt's not clear to me why you have the error only when adding a seemingly unrelated (to Kotlin) pluginYou didn't think it's that easy and obvious, did you? 😄 If the build scripts have the exact same classpath, the classloader is reused for both and no problem happens. As soon as you have different classpaths, like with applying one plugin to one project not the other, you get different classloaders => boom
Kirill Gavrilov
11/18/2023, 9:31 AMIf the build scripts have the exact same classpath, the classloader is reused for both and no problem happens.@Vampire that makes sense. Thank you for the explanation! @Thomas Broyer thank you! Adding the
id("kotlin-convention") apply false to the root Gradle module fixes the problem. I will use it as a solution to get rid of the warning