With precompiled scripts, how can use compileOnly ...
# community-support
p
With precompiled scripts, how can use compileOnly to depend on a another gradle plugin but also get generated accessors when using plugins block in my precompiled script? I guess, I need to add the dependency to some configuration đŸ¤”
e
if your precompiled script plugin contains
Copy code
plugins {
    id("some.other.plugin")
}
then it'll be applied to the model at build time and you'll get generated accessors
are you sure you want to
compileOnly
though? your own plugin will need it at runtime
p
Yes, that’s exactly what I want. Use case is fixing plugins not using workers, so they pollute your build script classpath, like dokka. This is even more relevant when using one gradle-plugin project containing multiple plugins. And I am fine to add the required plugins in the documentation, like: if you want to use x.y.docs, you need to depend on dokka too.
t
It's not clear what you're trying to do, but maybe this will help (the workarounds there I mean): https://github.com/gradle/gradle/issues/9282