Slackbot
09/07/2022, 2:55 PMJavi
09/07/2022, 2:59 PMimplementation
to compileOnly
maybe fix your problemJavi
09/07/2022, 3:00 PMjvm
one as implementation
, I add the generic one org.jetbrains.kotlin:kotlin-gradle-plugin
Chris Lee
09/07/2022, 3:19 PMcompileOnly
only sort of works, ran into the expected challenges. As this distribution contains multiple plugins (only a few of which are Kotlin related), applying a base plugin on the root project of a multi-project build fails with NoClassDefFoundError for Kotlin classes, even though the root project isn’t applying any Kotlin plugins. Adding the Kotlin plugin to the root project resolves this, but isnt’ desirable (the root project isn’t a Kotlin project and should not have/need that plugin).Thomas Broyer
09/07/2022, 3:30 PMapply(false)
to only add it to the buildscript classpath without applying the plugin.
I'd look at why the root project throws a NoClassDefFoundError though: if it's supposed to work on projects which aren't Kotlin projects, then it should be able to detect whether the project is a Kotlin project and only access those classes in those cases.Chris Lee
09/07/2022, 3:32 PMapply(false)
. It isn’t the root project that fails with that error, it’s subprojects when the root project is missing the Kotlin plugin (even though subprojects have it applied, before my plugin).Thomas Broyer
09/07/2022, 3:36 PMChris Lee
09/07/2022, 3:37 PMephemient
09/07/2022, 5:42 PM