Slackbot
02/09/2023, 10:54 AMVampire
02/09/2023, 11:05 AMapply false is useless, it is actually ignored and the plugin is applied. There is an issue that this should instead error out instead of just ignoring it.
It also does not make sense, as apply false would be for adding the plugin to the script classpath, but when working on a precompiled script plugin, you add the plugin to the classpath by depending on it in the build script of the build that builds the plugin.Arimil
02/09/2023, 11:12 AMbuildSrc then would it get pulled in via a composite build? This is happening in the root build.gralde of a composite build, so Kotlin is being added to the classpath before this line somewhere, I assumed it was buildSrc since that's what was recently changed, so I believed it was being added by the Kotlin DSL in that script plugin.Vampire
02/09/2023, 11:16 AMbuildSrc or from a composite build does not change much in that regard.
If the project you depend on has a dependency (other than compileOnly or similar) it will be on the classpath of the consumer, yes.Arimil
02/09/2023, 11:23 AM├─buildSrc
│ └─build.gradle.kts (uses kotlin DSL)
├─myCompositeProject
| └─build.gradle.kts (failing to apply kotlin plugin due to it already being in classpath)
├─build.gradle.ktsVampire
02/09/2023, 11:27 AMmyCompositeProject/build.gradle.kts has a dependency on the Kotlin plugin so that your precompiled script plugin can use it and you apply it in the plugin with version, it is wrong. And apply false is wrong in that case anyway.Arimil
02/09/2023, 11:29 AMmyCompositeProject, outside of the DSL buildSrc does nothing with Kotlin.Arimil
02/09/2023, 11:30 AMapply false was being used to set the version for myCompositeProject/project1/build.gradle.ktsVampire
02/09/2023, 11:30 AMArimil
02/09/2023, 11:32 AMArimil
02/09/2023, 11:59 AM