This message was deleted.
# plugin-development
s
This message was deleted.
g
Not that I know but you could add you wrapper plugin that will check your preconditions and apply relevant upstream plugins. If you use included build or buildSrc for your build logic simple plugin written in java + entry in the gradlePlugins block could do the trick.
t
You can use
apply()
right from your build script, after adding the plugin as a
classpath
dependency in
buildscript
, just like before the
plugins {}
DSL were introduced — no need to encapsulate it into a plugin (even though I do think it's preferable to use a plugin, but that's an opinion not backed by facts).
r
I would avoid using using
apply(…)
because it can cause hard-to-solve buildscript classloader issues. I don't know if it's idiomatic, but I think writing a wrapper binary plugin which conditionally applies the other plugin might work.