wakingrufus
01/11/2023, 4:08 PMtarget.plugins.withId("kotlin") { target.extensions.configure<KotlinProjectExtension>("kotlin") }
results in a
Caused by: java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: org/jetbrains/kotlin/gradle/dsl/KotlinProjectExtension
and I am trying to wrap my head around it and find a fix. i feel like the kotlin plugin might being doing weird stuff with classloaders?Vampire
01/11/2023, 4:26 PMProject#plugins
JavaDoc says you shouldn't use it but Project#pluginManager
and you should use the proper current ID of the plugin you check for. If it works with kotlin
that is probably just for backwards compatibility, but the current ID should be a different one I think.wakingrufus
01/11/2023, 4:44 PMkotlin
is the id of the base kotlin plugin, and then there are other plugins on top of it for jvm, multiplatform, etcwakingrufus
01/11/2023, 4:44 PMwakingrufus
01/11/2023, 4:45 PMwakingrufus
01/11/2023, 4:48 PMwakingrufus
01/11/2023, 4:48 PMwakingrufus
01/11/2023, 4:49 PMVampire
01/11/2023, 5:06 PMcompileOnly
? Regarding where you apply, I didn't mean syntax-wise. If you for example apply your plugin in the root project and some sub projects, but the Kotlin plugin only in some sub projects, your plugin cannot find the motion plugins classes as they are lower in the classloader hierarchy. Or if you add your plugin as buildSrc
dependency or even have it in there and apply the Kotlin plugin in your root project, same problem. ...wakingrufus
01/11/2023, 5:29 PMwakingrufus
01/11/2023, 5:29 PMVampire
01/11/2023, 5:37 PMKotlinProjectExtension
class?
What is their string representation?wakingrufus
01/11/2023, 5:38 PMwakingrufus
01/11/2023, 5:39 PMVampire
01/11/2023, 5:50 PMid
thing will not change your problem, hence was also just a sidenote.
It is just unclean to use these old obsolete plugin IDs that are only there for backwards compatibility.Vampire
01/11/2023, 5:56 PMkotlin
is not some base plugin.
It is simply the old obsolete name of org.jetbrains.kotlin.jvm
wakingrufus
01/11/2023, 7:12 PM