Slackbot
08/31/2023, 4:05 PMTodd Bednarczyk
08/31/2023, 4:06 PMbuildscript {
repositories {
mavenCentral()
}
}
plugins {
kotlin("jvm") version "1.8.10"
id("com.company.myplugin")
}
repositories {
mavenCentral()
}Todd Bednarczyk
08/31/2023, 4:07 PMGradleRunner.create()
.withProjectDir(context.projectDirectory.toFile())
.withPluginClasspath()
.withDebug(true)
.withArguments("assemble", "--stacktrace")
.build()Thomas Broyer
08/31/2023, 4:29 PMwithPluginClasspath) that's a parent of the actual build, so it won't ever see the plugins loaded by the project itself.Thomas Broyer
08/31/2023, 4:33 PMwithPluginClasspath) so both plugins are in the same classloader
• or avoid withPluginClasspath and load your plugin from, e.g., a local repository where you previously published it.Thomas Broyer
08/31/2023, 4:34 PMTodd Bednarczyk
08/31/2023, 4:46 PMThomas Broyer
08/31/2023, 4:48 PMTodd Bednarczyk
08/31/2023, 5:07 PMTodd Bednarczyk
08/31/2023, 8:40 PMwithDebug solved it.