we have a collection of plugins which do some usefull stuff. But one of them behaves completely wrong (enforcing a bom that replaces transitive dependencies to older versions and thus crashing the whole build).
The main plugin (A) calls the misbehaving one (B) using project.pluginmanager.apply(B::class). Is there a way to disable this or replace the wrong B with an own version of B? And keeping the rest intact.
And no, asking the plugin provider is not an option. For him the behavior of B is not a bug but a feature.
I don’t think so, except replacing B with a no-op version
or replace the wrong B with an own version of B?
Sure, plugins are not much different to dependencies.
If you for example apply (or even just add to the classpath) a newer version of B that will be used.
Or if it should be an older version or some fixed version, you can just use the normal things you can do for dependencies too in the according buildscript { ... } block or according place.